28 lines
716 B
JavaScript
28 lines
716 B
JavaScript
import Widget from "./Widget.js";
|
|
import BrushMode from "../BrushMode.js";
|
|
|
|
export default class TargetPointWidget extends Widget
|
|
{
|
|
constructor(widgetBar, brush) {
|
|
super('Zielpunkt');
|
|
this.widgetBar = widgetBar;
|
|
this.brush = brush;
|
|
this.htmlElement = this.createElement();
|
|
this.htmlElement.addEventListener(
|
|
'click',
|
|
() => {
|
|
this.widgetBar.disableWidgets();
|
|
this.enable();
|
|
this.brush.mode = BrushMode.EXIT;
|
|
}
|
|
);
|
|
}
|
|
|
|
createElement()
|
|
{
|
|
let htmlElement = document.createElement('div');
|
|
htmlElement.id = 'target-picker';
|
|
|
|
return htmlElement;
|
|
}
|
|
} |