-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b005b08
commit d350a98
Showing
5 changed files
with
104 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
--- | ||
Note: | ||
> Note: | ||
- The first version of this project is almost based on [jTopo(v0.4.8)](http://www.jtopo.com/) or [jTopo(v0.4.8)](http://www.jtopo.cn/). | ||
- The first version of pTopo is based on ES6. | ||
- Sincere thanks to the contributions of the author(jTopo). | ||
--- | ||
|
||
# pTopo |
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,15 @@ | ||
export default class Line { | ||
constructor (opts) { | ||
// dashed, curve, fold, straight, parabola ... | ||
this.lineType = opts.lineType || 'default' | ||
this.lineStyle = opts.lineStyle || '' | ||
this.lineWidth = opts.lineWidth || 2 | ||
this.lineColor = opts.lineColor || '0,0,0' | ||
this.lineDirection = opts.lineDirection || 'horizontal' | ||
this.linePaths = opts.linePaths || [] | ||
this.lineFn = opts.lineFn || null | ||
|
||
} | ||
|
||
paintLine(ctx) {} | ||
} |
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,31 @@ | ||
export default class LinKEnd { | ||
constructor (opts) { | ||
// default, arrow, circle, triangle, user-defined, ... | ||
this.linkEndType = opts.linkEndType || 'default' | ||
this.linkEndStyle = opts.linkEndStyle || '' | ||
this.linkEndColor = opts.linkEndColor || '' | ||
this.linkEndWidth = opts.linkEndWidth || '' | ||
this.linkEndColor = opts.linkEndColor || '' | ||
} | ||
|
||
paintLinkEnd(ctx) { | ||
switch (this.linkEndType) { | ||
case 'arrow': | ||
this.paintArrow(ctx) | ||
break | ||
case 'circle': | ||
this.paintCircle(ctx) | ||
break | ||
case 'triangle': | ||
this.paintTriangle(ctx) | ||
break | ||
default: | ||
} | ||
} | ||
|
||
paintArrow(ctx) {} | ||
|
||
paintCircle(ctx) {} | ||
|
||
paintTriangle(ctx) {} | ||
} |