Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x6-example-drawio中的连线无法绘制 #62

Closed
loongmxbt opened this issue Jan 2, 2020 · 1 comment
Closed

x6-example-drawio中的连线无法绘制 #62

loongmxbt opened this issue Jan 2, 2020 · 1 comment
Labels
type: bug 缺陷 Defects and unexpected behaviors

Comments

@loongmxbt
Copy link

loongmxbt commented Jan 2, 2020

Expected Behavior

Current Behavior

General中的第6行3、4、5元素,第7行连线元素,拖动到画布后均为 透明方框 或 方框,移动后有时会直接报错。
image

image

Possible Solution

Steps To Reproduce

  1. 运行drawio example
  2. 拖动 General中的第6行3、4、5元素,第7行连线元素
  3. 显示为白框或方框
  4. 再次拖动元素
  5. 报错
  6. 其余元素均正常
Error Message & Stack Trace
FlexArrowShape.drawEdgeShape
../../packages/x6/es/shape/arrow-connector.js:66
  63 |     pts[i0].y === pts[0].y) {
  64 |     i0 += 1;
  65 | }
> 66 | const dx = pts[i0].x - pts[0].x;
     | ^  67 | const dy = pts[i0].y - pts[0].y;
  68 | const dist = Math.sqrt(dx * dx + dy * dy);
  69 | if (dist === 0) {
View compiled
FlexArrowShape.draw
http://localhost:8000/umi.js:251327:22
  251324 |             pts.push(new _struct__WEBPACK_IMPORTED_MODULE_5__["Point"](p.x / s, p.y / s));
  251325 |         }
  251326 |     });
> 251327 |     this.drawEdgeShape(c, pts);
         |          ^  251328 | }
  251329 | else {
  251330 |     this.drawNodeShape(c, x, y, w, h);
View source
FlexArrowShape.redrawSvgShape
../../packages/x6/es/shape/shape-base.js:273
  270 | redrawSvgShape() {
  271 |     const canvas = this.createCanvas();
  272 |     if (canvas != null) {
> 273 |         this.draw(canvas);
      | ^  274 |         if (this.elem != null && this.elem !== canvas.root) {
  275 |             this.elem.insertAdjacentHTML('beforeend', canvas.root.outerHTML);
  276 |         }

Additional Context

Your Environment

  • yarn
  • x6: latest
  • OS: macOS Sierra
  • Browser: chrome and safari
@loongmxbt loongmxbt added the type: bug 缺陷 Defects and unexpected behaviors label Jan 2, 2020
bubkoo added a commit that referenced this issue Jan 6, 2020
@bubkoo bubkoo closed this as completed in db87181 Jan 8, 2020
@x6-bot
Copy link
Contributor

x6-bot bot commented Jan 8, 2021

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug 缺陷 Defects and unexpected behaviors
Projects
None yet
Development

No branches or pull requests

1 participant