Skip to content

Commit

Permalink
Ctrl+z does not affect properties field anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
renatopp committed Oct 14, 2015
1 parent f029c07 commit da458d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/pages/editor/components/propertiespanel.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
vm.original = null;
vm.block = null;
vm.update = update;
vm.keydown = keydown;

_create();
_activate();
Expand Down Expand Up @@ -58,6 +59,14 @@
$window.editor.off('nodechanged', _event);
}

function keydown(e) {
if (e.ctrlKey && e.keyCode == 90) {
e.preventDefault();
}

return false;
}

function update() {
var p = $window.editor.project.get();
var t = p.trees.getSelected();
Expand Down
2 changes: 2 additions & 0 deletions src/app/pages/editor/components/propertiespanel.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
class="form-control"
name="title"
placeholder="Title"
ng-keydown="propertiespanel.keydown($event)"
ng-model="propertiespanel.block.title"
ng-change="propertiespanel.update()">
</div>
Expand All @@ -25,6 +26,7 @@
rows="4"
class="form-control"
placeholder="Description"
ng-keydown="propertiespanel.keydown($event)"
ng-model="propertiespanel.block.description"
ng-change="propertiespanel.update()">

Expand Down

0 comments on commit da458d8

Please sign in to comment.