Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

'Snap-to-grid' functionality

$
0
0
Hello Adrian,

Indeed, you are right. The elements are removed by index and an incorrect element will be removed when when inserting an additional element to the shapes group. You can avoid the problem by inserting the grid in root group:
diagram.canvas.drawingElement.insertAt(grid, 0);
In this case you will also need to scale the grid when the diagram is zoomed e.g.
zoomEnd: function(e) {                  
    this.canvas.drawingElement.children[0].transform(kendo.geometry.transform().scale(e.zoom));
}


Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>