scinote-web/app/javascript/vue/shared/content/attachments/mixins/ove.js

27 lines
627 B
JavaScript

export default {
mounted() {
this.initOVE();
},
computed: {
OVEurl() {
if (this.step) {
return this.step.attributes.open_vector_editor_context.new_sequence_asset_url;
} else if (this.result) {
return this.result.attributes.open_vector_editor_context.new_sequence_asset_url;
}
}
},
methods: {
openOVEditor() {
window.showIFrameModal(this.OVEurl);
if (this.isCollapsed) {
this.$refs.toggleElement.click();
}
},
initOVE() {
$(window.iFrameModal).on('sequenceSaved', () => {
this.loadAttachments();
});
},
}
};