Skip to content

Commit

Permalink
chore(deps): bump @antv/matrix-util from 2.0.4 to 3.0.2 (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping authored May 6, 2020
1 parent a635fef commit 1e5869b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/g-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"dependencies": {
"@antv/event-emitter": "^0.1.1",
"@antv/g-math": "^0.1.3",
"@antv/matrix-util": "^2.0.4",
"@antv/matrix-util": "^3.0.2",
"@antv/path-util": "~2.0.5",
"@antv/util": "~2.0.0",
"@types/d3-timer": "^1.0.9",
Expand All @@ -63,4 +63,4 @@
"d3-timer": "^1.0.9"
},
"__npminstall_done": false
}
}
12 changes: 6 additions & 6 deletions packages/g-base/src/abstract/element.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { each, isEqual, isFunction, isNumber, isObject, isArray, noop, mix, upperFirst, uniqueId } from '@antv/util';
import { transform } from '@antv/matrix-util';
import * as mat3 from '@antv/matrix-util/lib/mat3';
import { IElement, IShape, IGroup, ICanvas, ICtor } from '../interfaces';
import { ClipCfg, ChangeType, OnFrame, ShapeAttrs, AnimateCfg, Animation, BBox, ShapeBase } from '../types';
import { removeFromArray, isParent } from '../util/util';
Expand Down Expand Up @@ -658,7 +658,7 @@ abstract class Element extends Base implements IElement {
*/
translate(translateX: number = 0, translateY: number = 0) {
const matrix = this.getMatrix();
const newMatrix = transform(matrix, [['t', translateX, translateY]]);
const newMatrix = mat3.transform(matrix, [['t', translateX, translateY]]);
this.setMatrix(newMatrix);
return this;
}
Expand Down Expand Up @@ -694,7 +694,7 @@ abstract class Element extends Base implements IElement {
*/
scale(ratioX: number, ratioY?: number) {
const matrix = this.getMatrix();
const newMatrix = transform(matrix, [['s', ratioX, ratioY || ratioX]]);
const newMatrix = mat3.transform(matrix, [['s', ratioX, ratioY || ratioX]]);
this.setMatrix(newMatrix);
return this;
}
Expand All @@ -706,7 +706,7 @@ abstract class Element extends Base implements IElement {
*/
rotate(radian: number) {
const matrix = this.getMatrix();
const newMatrix = transform(matrix, [['r', radian]]);
const newMatrix = mat3.transform(matrix, [['r', radian]]);
this.setMatrix(newMatrix);
return this;
}
Expand All @@ -719,7 +719,7 @@ abstract class Element extends Base implements IElement {
rotateAtStart(rotate: number): IElement {
const { x, y } = this.attr();
const matrix = this.getMatrix();
const newMatrix = transform(matrix, [
const newMatrix = mat3.transform(matrix, [
['t', -x, -y],
['r', rotate],
['t', x, y],
Expand All @@ -735,7 +735,7 @@ abstract class Element extends Base implements IElement {
*/
rotateAtPoint(x: number, y: number, rotate: number): IElement {
const matrix = this.getMatrix();
const newMatrix = transform(matrix, [
const newMatrix = mat3.transform(matrix, [
['t', -x, -y],
['r', rotate],
['t', x, y],
Expand Down
3 changes: 1 addition & 2 deletions packages/g-canvas/tests/bugs/issue-drag-spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const expect = require('chai').expect;
import Canvas from '../../src/canvas';
// import { transform } from '@antv/matrix-util';
// import { getColor } from '../get-color';

function simulateMouseEvent(dom, type, cfg) {
const event = new MouseEvent(type, cfg);
dom.dispatchEvent(event);
Expand Down

0 comments on commit 1e5869b

Please sign in to comment.