Socket
Socket
Sign inDemoInstall

@antv/g

Package Overview
Dependencies
Maintainers
4
Versions
349
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g - npm Package Compare versions

Comparing version 2.0.5-beta.3 to 2.0.5

.babelrc

9

.torch.compile.opts.js
module.exports = {
babelrc: {
presets: [
'es2015',
'stage-0'
[
"env",
{
"loose": true,
"modules": false
}
]
],

@@ -7,0 +12,0 @@ sourceMaps: 'inline'

@@ -1,3 +0,15 @@

# History
#### 2.0.5 (2018-01-24)
---
##### New Features
* feat(hit):all shape support lineAppendWidth
* feat(API): export PathSegment class
* feat(animate): add stop animate
* feat(animate): add repeat animate
##### Bug Fixes, etc.
* chore(dev): update vulnerable jquery
* chore(dev): provide ES5 version source
{
"name": "@antv/g",
"version": "2.0.5-beta.3",
"version": "2.0.5",
"description": "A canvas library which providing 2d draw for G2.",

@@ -12,3 +12,3 @@ "keywords": [

"browser": "build/g.js",
"module": "index.js",
"module": "lib/index.js",
"homepage": "https://github.com/antvis/g",

@@ -24,24 +24,26 @@ "author": "https://github.com/orgs/antvis/people",

"devDependencies": {
"@lite-js/torch": "^0.2.6",
"babel-eslint": "^7.2.3",
"babel-loader": "^7.1.1",
"babel-plugin-transform-remove-strict-mode": "0.0.2",
"babel-preset-es2015": "^6.24.0",
"babel-preset-stage-0": "^6.24.0",
"chai": "^4.0.1",
"@lite-js/torch": "~0.2.6",
"babel-cli": "~6.26.0",
"babel-eslint": "~7.2.3",
"babel-loader": "~7.1.1",
"babel-plugin-transform-remove-strict-mode": "~0.0.2",
"babel-preset-env": "~1.6.1",
"chai": "~4.0.1",
"electron": "~1.6.11",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-config-egg": "^4.2.0",
"event-simulate": "^1.0.0",
"istanbul": "^0.4.5",
"jquery": "~2.1.4",
"pre-commit": "^1.2.2",
"shelljs": "^0.7.8",
"spm-sinon": "^1.6.0",
"uglify-js": "^3.0.15",
"webpack": "^3.4.1"
"eslint": "~3.19.0",
"eslint-config-airbnb": "~15.0.1",
"eslint-config-egg": "~4.2.0",
"event-simulate": "~1.0.0",
"istanbul": "~0.4.5",
"jquery": "~3.3.1",
"pre-commit": "~1.2.2",
"shelljs": "~0.7.8",
"spm-sinon": "~1.6.0",
"string-replace-loader": "~1.3.0",
"uglify-js": "~3.0.15",
"webpack": "~3.4.1"
},
"scripts": {
"build": "webpack",
"build-lib": "babel src --out-dir lib",
"ci": "npm run lint && npm run test",

@@ -54,3 +56,3 @@ "compress": "uglifyjs --compress --mangle --output dist/g-$npm_package_version.min.js -- build/g.js",

"dist": "rm -rf dist && mkdir dist && npm run build && npm run compress",
"prepublishOnly": "npm run dist",
"prepublishOnly": "npm run build-lib && npm run dist",
"lint": "eslint ./",

@@ -69,9 +71,9 @@ "lint-fix": "eslint --fix ./",

"dependencies": {
"d3-ease": "^1.0.3",
"d3-interpolate": "^1.1.5",
"d3-timer": "^1.0.6",
"gl-matrix": "^2.3.2",
"lodash": "^4.17.4",
"wolfy87-eventemitter": "^5.1.0"
"d3-ease": "~1.0.3",
"d3-interpolate": "~1.1.5",
"d3-timer": "~1.0.6",
"gl-matrix": "~2.3.2",
"lodash": "~4.17.4",
"wolfy87-eventemitter": "~5.1.0"
}
}

@@ -7,3 +7,5 @@ const MatrixUtil = require('../../util/matrix');

const { interpolate, interpolateArray } = require('d3-interpolate'); // 目前整体动画只需要数值和数组的差值计算
const ReservedProps = {
delay: 'delay'
};
module.exports = {

@@ -49,2 +51,5 @@ stopAnimate() {

const fromM = Util.clone(self.getMatrix());
const repeat = toProps.repeat;
let timer = self.get('animateTimer');
timer && timer.stop();
// 可能不设置 easing

@@ -70,3 +75,19 @@ if (Util.isNumber(callback)) {

// 执行动画
const timer = d3Timer.timer(elapsed => {
timer = d3Timer.timer(elapsed => {
if (repeat) {
excuteRepeat(elapsed);
} else {
excuteOnce(elapsed);
}
}, delay);
self.setSilent('animateTimer', timer);
function excuteRepeat(elapsed) {
let ratio = (elapsed % duration) / duration;
ratio = d3Ease[easing](ratio);
update(ratio);
}
function excuteOnce(elapsed) {
let ratio = elapsed / duration;

@@ -84,6 +105,4 @@ if (ratio < 1) {

}
}, delay);
}
self.setSilent('animateTimer', timer);
function update(ratio) {

@@ -141,3 +160,3 @@ const cProps = {}; // 此刻属性

rst.M = props[k];
} else {
} else if (!ReservedProps[k]) {
rst.attrs[k] = props[k];

@@ -144,0 +163,0 @@ }

const webpack = require('webpack');
const {
resolve
} = require('path');
const resolve = require('path').resolve;
const pkg = require('./package.json');
module.exports = {
entry: {
g: './index.js'
g: './src/index.js'
},

@@ -24,17 +23,15 @@ output: {

options: {
babelrc: false,
plugins: [
'transform-remove-strict-mode'
],
presets: [
[
'es2015', {
loose: true,
modules: false
}
],
'stage-0'
]
babelrc: true
}
}
},
{
test: /index\.js$/,
use: {
loader: 'string-replace-loader',
options: {
search: '____G_VERSION____',
replace: pkg.version
}
}
}

@@ -41,0 +38,0 @@ ]

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

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