mirror of
https://gitee.com/antv/g6.git
synced 2024-12-03 04:08:32 +08:00
feat: fix node or edge size, fontSize, lineWidth while zooming graph with zoom-canvas.
This commit is contained in:
parent
b2fec65c93
commit
7c93298919
@ -127,4 +127,4 @@
|
||||
"webpack-cli": "^3.3.10",
|
||||
"worker-loader": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
@ -48,6 +48,9 @@ export default {
|
||||
let zoom = graphZoom;
|
||||
// 兼容IE、Firefox及Chrome
|
||||
if (e.wheelDelta < 0) {
|
||||
// ratio = 1 - DELTA * sensitivity;
|
||||
// ratio = graphZoom - DELTA * sensitivity;
|
||||
// zoom = graphZoom * ratio;
|
||||
ratio = 1 - DELTA * sensitivity;
|
||||
} else {
|
||||
ratio = 1 / (1 - DELTA * sensitivity);
|
||||
|
@ -310,6 +310,8 @@ export const shapeBase: ShapeOptions = {
|
||||
const style = styles[key];
|
||||
if (isPlainObject(style)) {
|
||||
const subShape = group.find((element) => element.get('name') === key);
|
||||
|
||||
|
||||
if (subShape) {
|
||||
subShape.attr(style);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user