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, '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;
};

View file

@ -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);
};

View file

@ -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));