Reputation: 12220
In Raphael it is easy to get the SVG root element:
svg_item = Raphael(0, 0, 3000, 3000);
svg_item.canvas.id = "main_svg";
svg_item.canvas.style.pointerEvents = "none";
but how this can be done in Snap.svg? The following doesn't work:
svg_item = Snap(3000, 3000);
svg_item.canvas.id = "main_svg";
svg_item.canvas.style.pointerEvents = "none";
Upvotes: 1
Views: 972
Reputation: 12220
Found the answer:
svg_item = Snap(3000, 3000);
svg_item.root.node.id = "main_svg";
svg_item.root.node.style.pointerEvents = "none";
Upvotes: 1
Reputation: 13852
Try paper rather than canvas, so..
svg_item.paper.id = "main_svg";
svg_item.paper.attr({ style: "pointer-events: none" });
Upvotes: 0