Skip to content

Commit

Permalink
get rid of resize handler
Browse files Browse the repository at this point in the history
  • Loading branch information
kevodwyer committed Aug 26, 2024
1 parent c06c656 commit 5c994b1
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/components/viewers/Markup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,6 @@ module.exports = {
frameDomain: function() {
return window.location.protocol + "//" + this.APP_NAME + '.' + window.location.host;
},
resizeHandler: function() {
// https://stackoverflow.com/a/35175835
let fullscreenElement = document.fullscreenElement || document.mozFullScreenElement
|| document.webkitFullscreenElement || document.msFullscreenElement;
this.fullscreenMode = fullscreenElement != null;
let iframe = document.getElementById("md-editor");
if (iframe == null) {
return;
}
iframe.style.width = '100%';
iframe.style.height = '100%';
},
messageHandler: function(e) {
let that = this;
let iframe = document.getElementById("md-editor");
Expand Down Expand Up @@ -209,7 +196,6 @@ module.exports = {
if (iframe != null) {
iframe.parentNode.removeChild(iframe);
window.removeEventListener('message', this.messageHandler);
window.removeEventListener("resize", this.resizeHandler);
}
this.isIframeInitialised = false;
let that = this;
Expand All @@ -225,14 +211,11 @@ module.exports = {
iframe.style.width = '100%';
iframe.style.height = '100%';
iframe.frameBorder="0";
iframe.scrolling="no";
iframeContainer.appendChild(iframe);
Vue.nextTick(function() {
iframe.src = that.frameUrl();
window.addEventListener('message', that.messageHandler);
window.addEventListener("resize", that.resizeHandler);
that.showSpinner = true;
that.setupIFrameMessaging(iframe, func);
setTimeout(() => {
Expand Down

0 comments on commit 5c994b1

Please sign in to comment.