3 ms·
that's true! and there are cases, where your way is applicable, however there are a couple issues with it when working with canvas apps(I'm not completely up to
by olsn 14y ago
that's true! and there are cases, where your way is applicable, however there are a couple issues with it when working with canvas apps(I'm not completely up to date with all the details about style.zoom, so correct me, if i'm wrong):
- the css3 'zoom' is not very well implemented, for example in FF you would have to use: -moz-transform: scale(XX); (which is a hassle, but okay - it works)
, but afaik in IE9 the whole method was marked deprecated - i don't know about IE10 - maybe we have some luck there, wouldn't rely on it though :-)
- when zooming via style.zoom, everything will be zoomed according to a base-width&height, so if the target-device has a different aspect ratio than your base-sizes, you will have to reposition certain objects by hand anyways, also you will have to set the width&height of the canvas manually - as there might be overlapping parts
- when it comes to targeting mobile devices with canvas, you quite often want to use tools like Ludei's cocoonJS or AppMobi's directCanvas, that render html-canvas as a native WebGL-stage on mobile, and css-values like zoom or any other markup will just be ignored on those platforms
- however when you are working with DOM-elements style.zoom can come pretty handy!
I really like your Poker-Demo btw.! Love how the animations are super-smooth! Keep it up!
cheers