Skip to content

Commit

Permalink
chore(deps): bump @antv/matrix-util from 2.0.4 to 3.0.2, ref: antvis/…
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping authored May 10, 2020
1 parent 6e5008d commit 3fdf9e2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion 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.1.0-beta.1",
"@antv/path-util": "~2.0.5",
"@antv/util": "~2.0.0",
"@types/d3-timer": "^1.0.9",
Expand Down
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 { ext } from '@antv/matrix-util';
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 = ext.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 = ext.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 = ext.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 = ext.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 = ext.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 3fdf9e2

Please sign in to comment.