-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(whiteboard): 🎸 add arrow shape
- Loading branch information
1 parent
8c73a57
commit 8247ed8
Showing
14 changed files
with
23,666 additions
and
16,989 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 |
---|---|---|
|
@@ -33,6 +33,8 @@ npm-debug.log | |
yarn-error.log | ||
testem.log | ||
/typings | ||
.yarn* | ||
|
||
|
||
# System Files | ||
.DS_Store | ||
|
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
29 changes: 29 additions & 0 deletions
29
projects/ng-whiteboard/src/lib/models/elements/arrow-element.model.ts
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,29 @@ | ||
import { LineCapEnum } from '../line-cap.enum'; | ||
import { LineJoinEnum } from '../line-join.enum'; | ||
import { IWhiteboardElementOptions } from '../whiteboard-element-options.model'; | ||
|
||
export class ArrowElement { | ||
x1: number; | ||
y1: number; | ||
x2: number; | ||
y2: number; | ||
strokeWidth: number; | ||
strokeColor: string; | ||
lineCap: LineCapEnum; | ||
lineJoin: LineJoinEnum; | ||
dasharray: string; | ||
dashoffset: number; | ||
|
||
constructor(options: IWhiteboardElementOptions) { | ||
this.x1 = options.x1 || 0; | ||
this.y1 = options.y1 || 0; | ||
this.x2 = options.x2 || 0; | ||
this.y2 = options.y2 || 0; | ||
this.strokeWidth = options.strokeWidth || 2; | ||
this.strokeColor = options.strokeColor || '#000000'; | ||
this.lineCap = options.lineCap || LineCapEnum.ROUND; | ||
this.lineJoin = options.lineJoin || LineJoinEnum.ROUND; | ||
this.dasharray = options.dasharray || ''; | ||
this.dashoffset = options.dashoffset || 0; | ||
} | ||
} |
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
Oops, something went wrong.