Get Existing Drawing Surface after initilization

2 posts, 1 answers
  1. Nicholas
    Nicholas avatar
    8 posts
    Member since:
    Oct 2014

    Posted 05 Jun 2017 Link to this post

    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.

  2. Answer
    Ivan Danchev
    Ivan Danchev avatar
    1396 posts

    Posted 06 Jun 2017 Link to this post

    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. 

    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.
Back to Top