Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antv/g-canvas

Package Overview
Dependencies
Maintainers
23
Versions
352
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.17 to 0.3.18

1

esm/shape/marker.d.ts

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

};
_getR(attrs: any): any;
_getPath(): any;

@@ -19,0 +20,0 @@ createPath(context: any): void;

11

esm/shape/marker.js

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

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

@@ -68,4 +69,3 @@ import ShapeBase from './base';

var x = attrs.x, y = attrs.y;
// 兼容 r 和 radius 两种写法,推荐使用 r
var r = attrs.r || attrs.radius;
var r = this._getR(attrs);
return {

@@ -78,2 +78,6 @@ x: x - r,

};
Marker.prototype._getR = function (attrs) {
// 兼容 r 和 radius 两种写法,推荐使用 r
return isNil(attrs.r) ? attrs.radius : attrs.r;
};
Marker.prototype._getPath = function () {

@@ -83,4 +87,3 @@ var attrs = this.attr();

var symbol = attrs.symbol || 'circle';
// 兼容 r 和 radius 两种写法,推荐使用 r
var r = attrs.r || attrs.radius;
var r = this._getR(attrs);
var method;

@@ -87,0 +90,0 @@ var path;

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

};
_getR(attrs: any): any;
_getPath(): any;

@@ -19,0 +20,0 @@ createPath(context: any): void;

@@ -8,5 +8,6 @@ "use strict";

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

@@ -70,4 +71,3 @@ var Symbols = {

var x = attrs.x, y = attrs.y;
// 兼容 r 和 radius 两种写法,推荐使用 r
var r = attrs.r || attrs.radius;
var r = this._getR(attrs);
return {

@@ -80,2 +80,6 @@ x: x - r,

};
Marker.prototype._getR = function (attrs) {
// 兼容 r 和 radius 两种写法,推荐使用 r
return util_1.isNil(attrs.r) ? attrs.radius : attrs.r;
};
Marker.prototype._getPath = function () {

@@ -85,7 +89,6 @@ var attrs = this.attr();

var symbol = attrs.symbol || 'circle';
// 兼容 r 和 radius 两种写法,推荐使用 r
var r = attrs.r || attrs.radius;
var r = this._getR(attrs);
var method;
var path;
if (util_1.isFunction(symbol)) {
if (util_2.isFunction(symbol)) {
method = symbol;

@@ -92,0 +95,0 @@ path = method(x, y, r);

{
"name": "@antv/g-canvas",
"version": "0.3.17",
"version": "0.3.18",
"description": "A canvas library which providing 2d",

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

"dependencies": {
"@antv/g-base": "^0.3.15",
"@antv/g-base": "^0.3.16",
"@antv/g-math": "^0.1.1",

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

"__npminstall_done": false,
"gitHead": "722f56861f5ac7712eca663c6daf0e48d20daa20"
"gitHead": "4f323fdabd74d8b05866c6efd3a9b41b495cdd37"
}

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