From 2d5f11b72c6b0be3b9c3c20aa85d899db2455cc4 Mon Sep 17 00:00:00 2001 From: FlashSystems Date: Wed, 14 Mar 2018 20:03:28 +0100 Subject: [PATCH] Added test for commit d2299c54, 059f0bc2, 2c70be46. --- types/snapsvg/test/2.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/types/snapsvg/test/2.ts b/types/snapsvg/test/2.ts index 0ab83291bd..5afcf36460 100644 --- a/types/snapsvg/test/2.ts +++ b/types/snapsvg/test/2.ts @@ -125,6 +125,19 @@ function tester6() { console.log(!path.isPointInsideBBox(b3, 50, 50)); } +function tester7() { + var paper = Snap(600, 800); + + Snap.load("http://snapsvg.io/assets/images/logo.svg", (fragment: Snap.Fragment) => { + // viewBox retrieveal + let fragmentViewBox = fragment.select("svg").attr("viewBox"); + let symbol = paper.symbol(fragmentViewBox.x, fragmentViewBox.y, fragmentViewBox.width, fragmentViewBox.height); + + symbol.add(fragment.selectAll("svg *")); + symbol.toDefs(); + }); +} + //$(function () { // tester1(); //}); @@ -134,3 +147,4 @@ function tester6() { //tester4(); //tester5(); //tester6(); +//tester7();