Disallow editor Edit mode when object is locked (#3208)

* Don't allow editor edit if object is locked

* Adds log statement

* Use capture phase for onDragOver

Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
This commit is contained in:
Shefali Joshi 2020-07-17 09:23:51 -07:00 committed by GitHub
parent cb63f4eca1
commit e3dcd51f8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,9 @@ export default {
mounted() {
this.currentObject = this.object;
this.updateView();
this.$el.addEventListener('dragover', this.onDragOver);
this.$el.addEventListener('dragover', this.onDragOver, {
capture: true
});
this.$el.addEventListener('drop', this.editIfEditable, {
capture: true
});
@ -269,6 +271,7 @@ export default {
if (provider &&
provider.canEdit &&
provider.canEdit(this.currentObject) &&
this.isEditingAllowed() &&
!this.openmct.editor.isEditing()) {
this.openmct.editor.edit();
}