I want to apply a CSS3 transform style to an image in GWT. For Example
imageZoom.getElement().getStyle().setProperty("-webkit-transform", "translate3d("+x+"px, "+y+"px, 0px)");
Where x and y are the coordinates of the mouse cursor in the image.
It shows the error as
Casused By java.lang.AssertionError: The style name should be in camel case format.
I renamed the style property to the following
-
1.-webkit-Transform
2.-Webkit-transform
3.-Webkit-Transform
I have also used the CamelCase Convertor but it is showing the same results as the one entered.
Thanks in Advance
I’m not sure about specifically GWT, but in JavaScript you remove the hyphens when using a prefix. webkit and ms are lower case, but O and Moz are uppercase. Here is some code for setting a transform in WebKit via vanilla JavaScript:
And here are the other prefixes and prefixless. Note the prefixless starts with lowercase:
Here is a demo of it in action: http://jsfiddle.net/qScux/
EDIT:
In GWT, that'd be: