mirror of
https://gitee.com/antv/g6.git
synced 2024-12-14 01:21:33 +08:00
fix(event): fix dom coord. Closes #305
This commit is contained in:
parent
0cf3c3b1ea
commit
60293af6c8
@ -13,8 +13,7 @@
|
||||
<script src="../build/g6.js"></script>
|
||||
<script src="../build/templateMaxSpanningForest.js"></script>
|
||||
<script>
|
||||
const Plugin = window.TemplateMaxSpanningForest;
|
||||
const plugin = new Plugin();
|
||||
const plugin = new G6.Plugins['template.maxSpanningForest']();
|
||||
const data = {
|
||||
nodes: [
|
||||
{
|
||||
|
@ -16,8 +16,7 @@
|
||||
<script src="../build/g6.js"></script>
|
||||
<script src="../build/toolMinimap.js"></script>
|
||||
<script>
|
||||
const Plugin = window.ToolMinimap;
|
||||
const plugin = new Plugin({
|
||||
const plugin = new G6.Plugins['tool.minimap']({
|
||||
container: 'minimap',
|
||||
width: 180,
|
||||
height: 120
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6",
|
||||
"version": "2.0.1-beta.1",
|
||||
"version": "2.0.1",
|
||||
"description": "graph visualization frame work",
|
||||
"main": "lib/index.js",
|
||||
"browser": "build/g6.js",
|
||||
|
@ -292,13 +292,14 @@ class Controller extends Base {
|
||||
const point = this._parsePoint(canvasPoint.x, canvasPoint.y);
|
||||
const shape = canvas.getShape(canvasPoint.x, canvasPoint.y);
|
||||
const item = graph.getItemByShape(shape);
|
||||
const pixelRatio = canvas.get('pixelRatio');
|
||||
return {
|
||||
item,
|
||||
shape,
|
||||
x: point.x,
|
||||
y: point.y,
|
||||
domX: ev.offsetX,
|
||||
domY: ev.offsetY,
|
||||
domX: canvasPoint.x / pixelRatio,
|
||||
domY: canvasPoint.y / pixelRatio,
|
||||
domEvent: ev
|
||||
};
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
module.exports = '2.0.1-beta.1';
|
||||
module.exports = '2.0.1';
|
||||
|
Loading…
Reference in New Issue
Block a user