Closed Sciss closed 9 years ago
canvas(cls := "cables", "width".attr := 400, "height".attr := 400)
Does what you want.
It's an unfortunate consequence of stuffing everything into the same namespace: tags, styles and attributes, so of course we end up with collisions.
If you don't like that, it's relatively straightforward to re-package all the attributes/styles/tags into your own styles
attrs
tags
namespaces (named however you want) using the stuff described in
http://lihaoyi.github.io/scalatags/#CustomBundles
and flesh out the currently-absent members (I'm only aware of height/width right now) so you can use them qualified without resorting to strings.
Ok, thanks
Hi,
is the behaviour correct?
gives me
<canvas class="cables" style="width: 400px; height: 400px"></canvas>
. But I want<canvas class="cables" width=400 height=400></canvas>
. All I can see as a workaround iswhich kind of defeats the purpose of using ScalaTags here...