Jquery Mobile Phonegap Filltext Max Width Property Not Working
i am working on an app that types text on to the image..so i dont want the text to go out of the image. here is my code: style #container{ overflow: hidden; z-index: 0; } #myCanva
Solution 1:
I think you are using the fillText wrong because it is defined as follows:
voidfillText(
in DOMString textToDraw,
in float x,
in float y,
[optional] in float maxWidth
);
and you are calling it with: context2.fillText(topTxt,50/*x*/,50/*y*/,100/*max-width*/,100,**maxWidth**);
So the last two aren't actually used.
See definition here: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_text#fillText()
Post a Comment for "Jquery Mobile Phonegap Filltext Max Width Property Not Working"