Remove jquery from BackgroundImageFrameRenderer.js

This commit is contained in:
Julian Descottes 2018-04-08 13:14:28 +02:00
parent 2726af2d81
commit 027cd2e2a6
3 changed files with 4 additions and 5 deletions

View File

@ -33,7 +33,7 @@
pskl.utils.Event.addEventListener(this.popup, 'resize', this.onWindowResize_, this); pskl.utils.Event.addEventListener(this.popup, 'resize', this.onWindowResize_, this);
pskl.utils.Event.addEventListener(this.popup, 'unload', this.onPopupClosed_, this); pskl.utils.Event.addEventListener(this.popup, 'unload', this.onPopupClosed_, this);
var container = this.popup.document.querySelector('.preview-container'); 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.updateZoom_();
this.renderFlag = true; this.renderFlag = true;
}; };

View File

@ -40,7 +40,7 @@
}; };
this.toggleOnionSkinButton = document.querySelector('.preview-toggle-onion-skin'); 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); this.popupPreviewController = new ns.PopupPreviewController(piskelController);
}; };

View File

@ -5,11 +5,10 @@
this.container = container; this.container = container;
this.setZoom(zoom); this.setZoom(zoom);
var containerEl = container.get(0); var containerDocument = container.ownerDocument;
var containerDocument = containerEl.ownerDocument;
this.frameContainer = containerDocument.createElement('div'); this.frameContainer = containerDocument.createElement('div');
this.frameContainer.classList.add('background-image-frame-container'); 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 = new pskl.model.frame.CachedFrameProcessor();
this.cachedFrameProcessor.setFrameProcessor(this.frameToDataUrl_.bind(this)); this.cachedFrameProcessor.setFrameProcessor(this.frameToDataUrl_.bind(this));