mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Remove jquery from FrameRenderer.js
This commit is contained in:
parent
027cd2e2a6
commit
f69e502639
@ -29,10 +29,11 @@
|
||||
'yOffset' : 0
|
||||
};
|
||||
|
||||
this.overlayRenderer = new pskl.rendering.frame.CachedFrameRenderer(this.container, cfg, ['canvas-overlay']);
|
||||
this.renderer = new pskl.rendering.frame.CachedFrameRenderer(this.container, cfg, ['drawing-canvas']);
|
||||
this.onionSkinRenderer = pskl.rendering.OnionSkinRenderer.createInContainer(this.container, cfg, piskelController);
|
||||
this.layersRenderer = new pskl.rendering.layer.LayersRenderer(this.container, cfg, piskelController);
|
||||
var containerEl = this.container.get(0);
|
||||
this.overlayRenderer = new pskl.rendering.frame.CachedFrameRenderer(containerEl, cfg, ['canvas-overlay']);
|
||||
this.renderer = new pskl.rendering.frame.CachedFrameRenderer(containerEl, cfg, ['drawing-canvas']);
|
||||
this.onionSkinRenderer = pskl.rendering.OnionSkinRenderer.createInContainer(containerEl, cfg, piskelController);
|
||||
this.layersRenderer = new pskl.rendering.layer.LayersRenderer(containerEl, cfg, piskelController);
|
||||
|
||||
this.compositeRenderer = new pskl.rendering.CompositeRenderer();
|
||||
this.compositeRenderer
|
||||
|
@ -199,7 +199,7 @@
|
||||
|
||||
this.displayCanvas = pskl.utils.CanvasUtils.createCanvas(width, height, this.classList);
|
||||
pskl.utils.CanvasUtils.disableImageSmoothing(this.displayCanvas);
|
||||
this.container.append(this.displayCanvas);
|
||||
this.container.appendChild(this.displayCanvas);
|
||||
};
|
||||
|
||||
ns.FrameRenderer.prototype.onUserSettingsChange_ = function (evt, settingName, settingValue) {
|
||||
@ -230,9 +230,9 @@
|
||||
* @public
|
||||
*/
|
||||
ns.FrameRenderer.prototype.getCoordinates = function(x, y) {
|
||||
var containerOffset = this.container.offset();
|
||||
x = x - containerOffset.left;
|
||||
y = y - containerOffset.top;
|
||||
var containerRect = this.container.getBoundingClientRect();
|
||||
x = x - containerRect.left;
|
||||
y = y - containerRect.top;
|
||||
|
||||
// apply margins
|
||||
x = x - this.margin.x;
|
||||
@ -261,9 +261,9 @@
|
||||
x = x + this.margin.x;
|
||||
y = y + this.margin.y;
|
||||
|
||||
var containerOffset = this.container.offset();
|
||||
x = x + containerOffset.left;
|
||||
y = y + containerOffset.top;
|
||||
var containerRect = this.container.getBoundingClientRect();
|
||||
x = x + containerRect.left;
|
||||
y = y + containerRect.top;
|
||||
|
||||
return {
|
||||
x : x + (cellSize / 2),
|
||||
|
Loading…
Reference in New Issue
Block a user