Fork me on GitHub

Hey guys looking to get some info for a solution we are designing.


@flyboarder: > What do you feel is the single most important aspect of your business when it comes to technology?* I don't quite understand this question. Can you rephrase it please or give an example response?


@onetom That is free to interpret, many business' use technology differently


As an example and investigator may say "Video Surveillance"


@adamw, @onetom: ^^^


^ woohoo, thank you ❤️


Hey ok so @jumblerg, here is a crazy question you might know a good solution for. Can you think of a sensible way to wire up a cell to the size of a given elem? I'm trying to do something perhaps a little nuts, auto-size an svg so it is responsive. To do that I can use transform on the svg object (we wired up the h/object tag using hoplon-ui internals, sorry sorry). I can apply a transform to the object (or its outer div) to scale it up to an appropriate size. But to do so I need to apply scale (svg:div). The div size changes based on the viewport size so... 🙂


There is a good argument to be made that I shouldn't bother...


@adamw: i haven’t done much with svg yet, but here’s some code i was using to get my transforms to scale down the size of the html then fill a space in my dashboard:

(elem :w (r 1 1) :h 300 :r 4 :c white :b 2 :bc (c 0xCCCCCC) :sv :auto :sh :hidden
  (elem :w (r 5 1) :h (r 5 1) :x (scale 0.2) :xx :left :xy :top :sv :hidden
    (cell= (render view)))


@jumblerg: thanks. When you scale by .2 that's a fixed (known) scale ratio? Is there a way to determine the current viewport size? Perhaps I need to set an event listener on js/window onsize.


for transforms, yeah. we need to make transforms take the same ratio types, but that was a more convenient, direct implementation, and i needed to make a think quick.


plus the browser is inconsistent at every turn; everything is a special case, basically. everytime i think i have an abstraction that’s working well, another one comes along and throws a wrench into things.


the scale fn in this case is a helper that returns a css 3d transform matrix.


Yep, saw it in ui.attrs


(.innerWidth js/window) etc should give you the viewport size


if you look at the skin middlewarish fn, you can see the attributes i set there to get an svg to scale to the size of an elem


i don’t recall if i ever got it quite right