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

@antv/g-canvas

Package Overview
Dependencies
Maintainers
23
Versions
359
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-canvas - npm Package Compare versions

Comparing version 0.3.9 to 0.3.10

11

esm/shape/marker.js

@@ -6,2 +6,3 @@ /**

import { __extends } from "tslib";
import path2Absolute from '@antv/path-util/lib/path-2-absolute';
import ShapeBase from './base';

@@ -30,3 +31,3 @@ import { isFunction } from '../util/util';

var diffY = r * Math.sin((1 / 3) * Math.PI);
return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['z']];
return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['Z']];
},

@@ -80,7 +81,13 @@ // 倒三角形

var method;
var path;
if (isFunction(symbol)) {
method = symbol;
path = method(x, y, r);
// 将 path 转成绝对路径
path = path2Absolute(path);
}
else {
// 内置 symbol 的 path 都是绝对路径,直接绘制即可,不需要对 path 进行特殊处理
method = Marker.Symbols[symbol];
path = method(x, y, r);
}

@@ -91,3 +98,3 @@ if (!method) {

}
return method(x, y, r);
return path;
};

@@ -94,0 +101,0 @@ Marker.prototype.createPath = function (context) {

@@ -8,2 +8,3 @@ "use strict";

var tslib_1 = require("tslib");
var path_2_absolute_1 = require("@antv/path-util/lib/path-2-absolute");
var base_1 = require("./base");

@@ -32,3 +33,3 @@ var util_1 = require("../util/util");

var diffY = r * Math.sin((1 / 3) * Math.PI);
return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['z']];
return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['Z']];
},

@@ -82,7 +83,13 @@ // 倒三角形

var method;
var path;
if (util_1.isFunction(symbol)) {
method = symbol;
path = method(x, y, r);
// 将 path 转成绝对路径
path = path_2_absolute_1.default(path);
}
else {
// 内置 symbol 的 path 都是绝对路径,直接绘制即可,不需要对 path 进行特殊处理
method = Marker.Symbols[symbol];
path = method(x, y, r);
}

@@ -93,3 +100,3 @@ if (!method) {

}
return method(x, y, r);
return path;
};

@@ -96,0 +103,0 @@ Marker.prototype.createPath = function (context) {

6

package.json
{
"name": "@antv/g-canvas",
"version": "0.3.9",
"version": "0.3.10",
"description": "A canvas library which providing 2d",

@@ -58,3 +58,3 @@ "main": "lib/index.js",

"dependencies": {
"@antv/g-base": "^0.3.7",
"@antv/g-base": "^0.3.8",
"@antv/g-math": "^0.1.1",

@@ -66,3 +66,3 @@ "@antv/gl-matrix": "~2.7.1",

"__npminstall_done": false,
"gitHead": "e9a25074e1edac1b3c94a07e614b21bd2d77998d"
"gitHead": "d3533a49ee2c8883b9c1b2c1accba86041453ebc"
}

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 not supported yet

Sorry, the diff of this file is not supported yet

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