Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Add static to colorpicker components ViewChild
Browse files Browse the repository at this point in the history
  • Loading branch information
Peshou committed Mar 11, 2020
1 parent f6d2254 commit cbaef4e
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/bundles/ng2-canvas-whiteboard.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/bundles/ng2-canvas-whiteboard.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/modules/ng2-canvas-whiteboard.es5.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/modules/ng2-canvas-whiteboard.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ng2-canvas-whiteboard.metadata.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"angular4",
"angular5",
"angular6",
"angular7",
"angular8",
"angular9",
"canvas",
"drawing",
"touch drawing",
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"angular4",
"angular5",
"angular6",
"angular7",
"angular8",
"angular9",
"canvas",
"drawing",
"touch drawing",
Expand Down
4 changes: 2 additions & 2 deletions src/canvas-whiteboard-colorpicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class CanvasWhiteboardColorPickerComponent implements OnInit {

@Input() previewText: string;
@Input() readonly selectedColor: string = 'rgba(0,0,0,1)';
@ViewChild('canvaswhiteboardcolorpicker') canvas: ElementRef;
@ViewChild('canvaswhiteboardcolorpicker', { static: true }) canvas: ElementRef;

@Input() readonly showColorPicker: boolean = false;
private _context: CanvasRenderingContext2D;
Expand Down Expand Up @@ -137,4 +137,4 @@ export class CanvasWhiteboardColorPickerComponent implements OnInit {
this.onColorSelected.emit(color);
this.toggleColorPicker(null);
}
}
}

0 comments on commit cbaef4e

Please sign in to comment.