25 lines
536 B
JavaScript
25 lines
536 B
JavaScript
// Idea here is, tool can declare its parameters;
|
|
// can call back to toolbar for whatever...
|
|
// through toolbar can access sim
|
|
|
|
import {
|
|
DRAGGABLE_ELEMENT_CLASSNAME,
|
|
TOOL_CLASSNAME,
|
|
} from './config.js';
|
|
|
|
export class Tool {
|
|
toolbar = undefined;
|
|
sim = undefined;
|
|
|
|
constructor(toolbar) {
|
|
this.toolbar = toolbar;
|
|
this.sim = this.toolbar.sim;
|
|
const div = document.createElement('div');
|
|
this.div = div;
|
|
div.classList.add(TOOL_CLASSNAME)
|
|
div.classList.add(DRAGGABLE_ELEMENT_CLASSNAME);
|
|
}
|
|
|
|
frame() {}
|
|
}
|