mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-26 10:56:19 +08:00
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user