So I have an existing class in javascript that takes an element and then
draws into it using a canvas. In javascript, you create it like this:
var timeline = new Timeline(document.getElementById(canvas));
I'd like to wrap this in GWT using a JavascriptObject but I'm not sure how
to create
Really stupid question: do you have a typo'd 'r' after the open curly?
It's there in your pasted code snippet, and with JS's automatic semicolon
insertion, I'm pretty sure it would try to use it as if you'd written
r;.
Also, yes, I think you'd want to use $wnd.ActualJSObjectName.
On
Ha, not a stupid question at all ... it seems that was the problem! Thanks
so much, good thing I copied and pasted the code into the question!
But more generally, is this what I should be doing? Or should I use a
different approach for what I'm trying to do?
Thanks again!
--
You received
To create the overlay type I also tried this:
return new $wnd.Timeline(canvas);
But it didn't seem to make a difference.
Maybe I'm not using the right functionality here? I'd basically like to
create an object in pure javascript but overlay it with java to have it
available to other
Cool, glad that was an easy fix.
Yeah, this is a good approach. See https://github.com/richkadel/cesium-gwt
for a larger-scale use of this technique for wrapping the Cesium.js 3D
globe library.
On Monday, February 9, 2015 at 5:30:45 PM UTC-5, rjcarr wrote:
Ha, not a stupid question at all
Awesome, thanks so much for the help!
On Mon, Feb 9, 2015 at 2:39 PM, Mark Erikson mark.erik...@gmail.com wrote:
Cool, glad that was an easy fix.
Yeah, this is a good approach. See
https://github.com/richkadel/cesium-gwt for a larger-scale use of this
technique for wrapping the Cesium.js
The error says it. You have an undeclared r variable in your JavaScript code
On 9 Feb 2015 22:53, rjcarr rjc...@gmail.com wrote:
To create the overlay type I also tried this:
return new $wnd.Timeline(canvas);
But it didn't seem to make a difference.
Maybe I'm not using the right