-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: skip postprocess localposition if transform exists
- Loading branch information
Showing
5 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Canvas, CanvasEvent, Circle } from '@antv/g'; | ||
import { Renderer as CanvasRenderer } from '@antv/g-canvas'; | ||
|
||
/** | ||
* Trigger pointerdown on circle then trigger pointerupoutside on canvas. | ||
*/ | ||
|
||
// create a renderer | ||
const canvasRenderer = new CanvasRenderer(); | ||
|
||
// create a canvas | ||
const canvas = new Canvas({ | ||
container: 'container', | ||
width: 600, | ||
height: 500, | ||
renderer: canvasRenderer, | ||
}); | ||
|
||
// create a circle | ||
const circle = new Circle({ | ||
style: { | ||
cx: 300, | ||
cy: 200, | ||
r: 100, | ||
fill: '#1890FF', | ||
stroke: '#F04864', | ||
lineWidth: 4, | ||
shadowColor: 'black', | ||
shadowBlur: 20, | ||
cursor: 'pointer', | ||
}, | ||
}); | ||
|
||
canvas.addEventListener(CanvasEvent.READY, () => { | ||
// add a circle to canvas | ||
canvas.appendChild(circle); | ||
}); | ||
|
||
circle.addEventListener('pointerupoutside', () => { | ||
console.log('pointerupoutside'); | ||
}); |