New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@symbolic/svgcanvas

Package Overview
Dependencies
Maintainers
5
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symbolic/svgcanvas - npm Package Compare versions

Comparing version 2.5.1 to 2.5.2

23

context.js

@@ -399,14 +399,17 @@ /*!!

//is this a gradient or pattern?
if (value instanceof CanvasPattern) {
//pattern
if (value.__ctx) {
//copy over defs
for(nodeIndex = 0; nodeIndex < value.__ctx.__defs.childNodes.length; nodeIndex++){
node = value.__ctx.__defs.childNodes[nodeIndex];
id = node.getAttribute("id");
this.__ids[id] = id;
this.__defs.appendChild(node);
if (value instanceof CanvasPattern || value.constructor.name === 'CanvasPattern') {
if (value.image) { //MODIFIED
value = this.createPattern(value.image, null); //HINT pulls in original image ref from Konva
//pattern
if (value.__ctx) {
//copy over defs
for(nodeIndex = 0; nodeIndex < value.__ctx.__defs.childNodes.length; nodeIndex++){
node = value.__ctx.__defs.childNodes[nodeIndex];
id = node.getAttribute("id");
this.__ids[id] = id;
this.__defs.appendChild(node);
}
}
currentElement.setAttribute(style.apply, format("url(#{id})", {id:value.__root.getAttribute("id")}));
}
currentElement.setAttribute(style.apply, format("url(#{id})", {id:value.__root.getAttribute("id")}));
}

@@ -413,0 +416,0 @@ else if (value instanceof CanvasGradient) {

@@ -490,14 +490,17 @@ function toString(obj) {

//is this a gradient or pattern?
if (value instanceof CanvasPattern) {
//pattern
if (value.__ctx) {
//copy over defs
for(nodeIndex = 0; nodeIndex < value.__ctx.__defs.childNodes.length; nodeIndex++){
node = value.__ctx.__defs.childNodes[nodeIndex];
id = node.getAttribute("id");
this.__ids[id] = id;
this.__defs.appendChild(node);
if (value instanceof CanvasPattern || value.constructor.name === 'CanvasPattern') {
if (value.image) { //MODIFIED
value = this.createPattern(value.image, null); //HINT pulls in original image ref from Konva
//pattern
if (value.__ctx) {
//copy over defs
for(nodeIndex = 0; nodeIndex < value.__ctx.__defs.childNodes.length; nodeIndex++){
node = value.__ctx.__defs.childNodes[nodeIndex];
id = node.getAttribute("id");
this.__ids[id] = id;
this.__defs.appendChild(node);
}
}
currentElement.setAttribute(style.apply, format("url(#{id})", {id:value.__root.getAttribute("id")}));
}
currentElement.setAttribute(style.apply, format("url(#{id})", {id:value.__root.getAttribute("id")}));
}

@@ -504,0 +507,0 @@ else if (value instanceof CanvasGradient) {

@@ -494,14 +494,17 @@ 'use strict';

//is this a gradient or pattern?
if (value instanceof CanvasPattern) {
//pattern
if (value.__ctx) {
//copy over defs
for(nodeIndex = 0; nodeIndex < value.__ctx.__defs.childNodes.length; nodeIndex++){
node = value.__ctx.__defs.childNodes[nodeIndex];
id = node.getAttribute("id");
this.__ids[id] = id;
this.__defs.appendChild(node);
if (value instanceof CanvasPattern || value.constructor.name === 'CanvasPattern') {
if (value.image) { //MODIFIED
value = this.createPattern(value.image, null); //HINT pulls in original image ref from Konva
//pattern
if (value.__ctx) {
//copy over defs
for(nodeIndex = 0; nodeIndex < value.__ctx.__defs.childNodes.length; nodeIndex++){
node = value.__ctx.__defs.childNodes[nodeIndex];
id = node.getAttribute("id");
this.__ids[id] = id;
this.__defs.appendChild(node);
}
}
currentElement.setAttribute(style.apply, format("url(#{id})", {id:value.__root.getAttribute("id")}));
}
currentElement.setAttribute(style.apply, format("url(#{id})", {id:value.__root.getAttribute("id")}));
}

@@ -508,0 +511,0 @@ else if (value instanceof CanvasGradient) {

{
"name": "@symbolic/svgcanvas",
"version": "2.5.1",
"version": "2.5.2",
"description": "@symbolic/svgcanvas",

@@ -5,0 +5,0 @@ "main": "dist/svgcanvas.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc