diff --git a/src/js/controller/preview/PopupPreviewController.js b/src/js/controller/preview/PopupPreviewController.js index f93eda5..708678c 100644 --- a/src/js/controller/preview/PopupPreviewController.js +++ b/src/js/controller/preview/PopupPreviewController.js @@ -33,7 +33,7 @@ pskl.utils.Event.addEventListener(this.popup, 'resize', this.onWindowResize_, this); pskl.utils.Event.addEventListener(this.popup, 'unload', this.onPopupClosed_, this); var container = this.popup.document.querySelector('.preview-container'); - this.renderer = new pskl.rendering.frame.BackgroundImageFrameRenderer($(container)); + this.renderer = new pskl.rendering.frame.BackgroundImageFrameRenderer(container); this.updateZoom_(); this.renderFlag = true; }; diff --git a/src/js/controller/preview/PreviewController.js b/src/js/controller/preview/PreviewController.js index b6aa657..bd14f57 100644 --- a/src/js/controller/preview/PreviewController.js +++ b/src/js/controller/preview/PreviewController.js @@ -40,7 +40,7 @@ }; this.toggleOnionSkinButton = document.querySelector('.preview-toggle-onion-skin'); - this.renderer = new pskl.rendering.frame.BackgroundImageFrameRenderer(this.container); + this.renderer = new pskl.rendering.frame.BackgroundImageFrameRenderer(this.container.get(0)); this.popupPreviewController = new ns.PopupPreviewController(piskelController); }; diff --git a/src/js/rendering/frame/BackgroundImageFrameRenderer.js b/src/js/rendering/frame/BackgroundImageFrameRenderer.js index 96f6ff7..cf1ba39 100644 --- a/src/js/rendering/frame/BackgroundImageFrameRenderer.js +++ b/src/js/rendering/frame/BackgroundImageFrameRenderer.js @@ -5,11 +5,10 @@ this.container = container; this.setZoom(zoom); - var containerEl = container.get(0); - var containerDocument = containerEl.ownerDocument; + var containerDocument = container.ownerDocument; this.frameContainer = containerDocument.createElement('div'); this.frameContainer.classList.add('background-image-frame-container'); - container.get(0).appendChild(this.frameContainer); + container.appendChild(this.frameContainer); this.cachedFrameProcessor = new pskl.model.frame.CachedFrameProcessor(); this.cachedFrameProcessor.setFrameProcessor(this.frameToDataUrl_.bind(this));