is there any way using gwt canvas in domino-ui other than HTMLCanvasElement

227 Views Asked by At

I have a big project using other UI which has a big portion of it using the GWT canvas and if I am thinking to use the domino-ui I prefer to keep the GWT canvas code.

1

There are 1 best solutions below

2
On BEST ANSWER

Yes you can. Either you use elemental2 canvas, Or you use GWT canvas and wrap it as an element. you need to include this dependency

<dependency>
    <groupId>org.jboss.gwt.elemento</groupId>
    <artifactId>elemento-widget</artifactId>
    <version>${use elemento version here}</version>
</dependency>

Then you can wrap a canvas as element using this

Widgets.asElement(myGwtCanvas)

And don't forget about the inheritance of this GWT module