mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Gisela and target point added.
This commit is contained in:
28
tilorswift/js/menu/TargetPointWidget.js
Normal file
28
tilorswift/js/menu/TargetPointWidget.js
Normal file
@@ -0,0 +1,28 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user