Open czyzby opened 8 years ago
HTMLCanvasElement specification does not contain mentioned methods:
interface HTMLCanvasElement : HTMLElement {
attribute unsigned long width;
attribute unsigned long height;
DOMString toDataURL(in optional DOMString type, in any... args);
void toBlob(in FileCallback, in optional DOMString type, in any... args);
object getContext(in DOMString contextId, in any... args);
};
That's why I've already created HTMLCanvasElementExtension interface to extend it with certain methods, may be we can added them to this interface.
Could you add the methods you are requiring to HTMLCanvasElementExtension and make a PR with these changes?
I'd have to inspect GWT code, I'm pretty sure some of these methods are custom and GWT-specific. With that in mind, I think that implementing these with some native code in gdx-dragome
might be the sensible way to go, as they don't seem to be part of the standard.
GWT LibGDX backend uses these methods to determine relative X and Y from received events:
However, Dragome
HTMLCanvasElement
is missing multiple used methods, likegetClientHeight
,getAbsoluteLeft
orgetScrollLeft
. Are there any (planned?) canvas extensions that would provide similar API?