gravity/tool.js

27 lines
661 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} 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.style.position = 'relative';
div.style.top = 0;
div.style.left = 0;
div.style.border = '1px #0fb solid';
div.style.margin = '5px';
div.style.padding = '5px';
div.classList.add(DRAGGABLE_ELEMENT_CLASSNAME);
}
frame() {}
}