From a0c617b74f69029f368ef582c60d0fe3ab050cef Mon Sep 17 00:00:00 2001 From: bwbohl Date: Mon, 5 Feb 2024 22:52:11 +0100 Subject: [PATCH] improve: renderingView fitting to window * revert some changes from #342 * move style definitions to eoTheme sass --- app/view/window/image/VerovioImage.js | 26 +++++++++---------- packages/eoTheme/sass/etc/all.scss | 9 ++++--- .../sass/etc/renderingViewContent.scss | 7 +++++ 3 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 packages/eoTheme/sass/etc/renderingViewContent.scss diff --git a/app/view/window/image/VerovioImage.js b/app/view/window/image/VerovioImage.js index 366d79acc..d22b01b91 100644 --- a/app/view/window/image/VerovioImage.js +++ b/app/view/window/image/VerovioImage.js @@ -18,36 +18,36 @@ */ Ext.define('EdiromOnline.view.window.image.VerovioImage', { extend: 'Ext.panel.Panel', - + layout: 'fit', - + initComponent: function () { - + var me = this; - - me.html = '
'; - + + me.html = '
'; + me.callParent(); }, - + setIFrameURL: function (url) { var me = this; var contEl = me.el.getById(me.id + '_rendContIFrame'); contEl.set({ 'src': url }); - + }, - + showMovement: function (movementId) { var me = this; - + var iframe = Ext.fly(me.id + '_rendContIFrame').dom.contentWindow; iframe.showMovement(movementId); }, - - /* + + /* * Call showMeasure of corresponding iframe. * @param {string} movementId - The XML-ID of the selected movement. * @param {string} measureId - The XML-ID of the selected measure. diff --git a/packages/eoTheme/sass/etc/all.scss b/packages/eoTheme/sass/etc/all.scss index afcb277a4..50a944a2b 100644 --- a/packages/eoTheme/sass/etc/all.scss +++ b/packages/eoTheme/sass/etc/all.scss @@ -1,11 +1,11 @@ -@import 'webfonts.scss'; +@import 'webfonts.scss'; @import 'mixins.scss'; /*Edirom*/ @import 'facsimile.scss'; @import 'xml.scss'; @import 'toolbar.scss'; - + //@import 'textViewContent.scss'; @import 'textView.scss'; @import 'headerView.scss'; @@ -16,4 +16,7 @@ @import 'freidi.scss'; /*Annotations*/ -@import 'annotation.scss'; \ No newline at end of file +@import 'annotation.scss'; + +/*renderingView (Verovio)*/ +@import 'renderingViewContent.scss' diff --git a/packages/eoTheme/sass/etc/renderingViewContent.scss b/packages/eoTheme/sass/etc/renderingViewContent.scss new file mode 100644 index 000000000..a9ef7c70a --- /dev/null +++ b/packages/eoTheme/sass/etc/renderingViewContent.scss @@ -0,0 +1,7 @@ +/* make verovio iFrame fit Edirom window */ +.renderingViewContent, .renderingViewContent iframe { + width: 100%; + height: 100%; + border: none; + overflow: hidden; +}