Skip to content
Snippets Groups Projects
Commit b7fd7d8e authored by Eugen Ciur's avatar Eugen Ciur
Browse files

almost warking ui select element

parent 0d5bbdc7
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,7 @@ export default class CommanderComponent extends Component {
@action
openNewFolderModal() {
console.log('on new folder');
this.show_new_folder_modal = true;
}
......
......@@ -117,22 +117,22 @@ export default class UISelectModifier extends Modifier {
@action
onMouseMove(event) {
if (this.ui_select) {
if (!event.buttons) {
this.remove_div();
} else if (this.ui_select) {
this.ui_select.update(event.clientX, event.clientY);
}
}
@action
onMouseUp() {
if (this.ui_select) {
this.ui_select.remove_div();
this.ui_select = undefined;
}
console.log('mouse up');
this.remove_div();
}
@action
onMouseDown(event) {
console.log('mouse down');
this.ui_select = new UISelect(
this.element,
event.clientX,
......@@ -141,4 +141,11 @@ export default class UISelectModifier extends Modifier {
this.ui_select.create_div();
}
remove_div() {
if (this.ui_select) {
this.ui_select.remove_div();
this.ui_select = undefined;
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment