This is a migrated thread and some comments may be shown as answers.

Get Existing Drawing Surface after initilization

1 Answer 92 Views
Drawing API
This is a migrated thread and some comments may be shown as answers.
Nicholas
Top achievements
Rank 1
Nicholas asked on 05 Jun 2017, 10:33 PM

Say I create a new surface:

var surface = draw.Surface.create($("#surface"));

 

Now in a different part of the program I want get that existing surface.  In other kendo widgets I can do for example $("#surface").data("kendoGrid")

 

but I can't seem to figure out how to do the same thing with a drawing surface.

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 06 Jun 2017, 07:34 AM
Hello Nicholas,

At my end getting the reference to the surface works as expected. See this dojo, in which we first create a Surface and in the button's click handler we get a reference to it and clear it by calling its clear method. 

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Drawing API
Asked by
Nicholas
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or