Skip to content

Commit

Permalink
feat: 升级 g 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zengyue committed Nov 15, 2024
1 parent d715549 commit ff14df8
Show file tree
Hide file tree
Showing 36 changed files with 71,574 additions and 30 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ module.exports = {
},
},
},
transformIgnorePatterns: ['/node_modules/(?!d3-color/)'],
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/f2-wordcloud/test/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ describe('WordCloud', () => {
style={{
x: 0,
y: 0,
img,
src: img,
width: 300,
height: 225,
}}
Expand Down
2 changes: 1 addition & 1 deletion packages/f2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"type-fest": "^3.5.0"
},
"devDependencies": {
"@antv/g-mobile-svg": "~0.10.0"
"@antv/g-mobile-svg": "~1.0.0"
},
"miniprogram": "dist"
}
3 changes: 1 addition & 2 deletions packages/f2/src/chart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Children,
jsx,
Ref,
createRef,
} from '@antv/f-engine';
import { ScaleConfig } from '../deps/f2-scale/src';
import { each, findIndex, isArray, deepMix } from '@antv/util';
Expand Down Expand Up @@ -76,7 +75,7 @@ class Chart<

this.scale = new ScaleController(data);
this.coord = new CoordController();
this.coordRef = createRef();
this.coordRef = {};
// state
this.state = {
filters: {},
Expand Down
2 changes: 2 additions & 0 deletions packages/f2/src/components/guide/views/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ export default class Tag extends Component<TagGuideProps> {
return (
<group
style={{
// @ts-ignore
x: posX,
// @ts-ignore
y: posY,
}}
>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions site/.dumi/components/MultiRender.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Renderer as CanvasRenderer } from '@antv/g-mobile-canvas';
import { Renderer as SVGRenderer } from '@antv/g-mobile-svg';
import { Renderer as WebGLRenderer } from '@antv/g-mobile-webgl';
import React, { useRef, useState } from 'react';
Expand All @@ -19,7 +18,6 @@ function renderChart(F2, options) {
const { Canvas, Chart, Axis, Line } = F2;
function getProps(data) {
const { props } = (
// @ts-ignore
<Canvas pixelRatio={window.devicePixelRatio} animate={false} {...options}>
<Chart data={data}>
<Axis field="rate" />
Expand Down Expand Up @@ -66,9 +64,9 @@ export default ({ F2 }) => {
canvasEl.style.width = '100%';
canvasEl.style.height = '100%';
container.appendChild(canvasEl);
const canvasRenderer = new CanvasRenderer();
// const canvasRenderer = new CanvasRenderer();
const canvas = renderChart(F2, {
renderer: canvasRenderer,
// renderer: canvasRenderer,
context: canvasEl.getContext('2d'),
});
setCanvas(canvas);
Expand Down
2 changes: 1 addition & 1 deletion site/.dumi/components/Pan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function renderChart(F2, canvasEl: HTMLCanvasElement) {
setTimeout(async () => {
gestureSimulator(canvasEl, 'touchstart', { x: 350, y: 35 });
loopTouchmove();
});
}, 1000);

return canvas;
}
Expand Down
2 changes: 1 addition & 1 deletion site/.dumi/components/Pinch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function renderChart(F2, canvasEl: HTMLCanvasElement) {
{ x: 260, y: 260 },
]);
loopTouchmove();
});
}, 1000);

return canvas;
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ff14df8

Please sign in to comment.