mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
initialize insert-location frame-picker on show()
This commit is contained in:
parent
c6733cdad4
commit
a72b0c69e5
@ -17,11 +17,6 @@
|
|||||||
this.framePreview = this.container.querySelector('.insert-frame-preview');
|
this.framePreview = this.container.querySelector('.insert-frame-preview');
|
||||||
this.currentPiskelFramePickerWidget = new pskl.widgets.FramePicker(
|
this.currentPiskelFramePickerWidget = new pskl.widgets.FramePicker(
|
||||||
this.piskelController.getPiskel(), this.framePreview);
|
this.piskelController.getPiskel(), this.framePreview);
|
||||||
this.currentPiskelFramePickerWidget.init();
|
|
||||||
|
|
||||||
var currentFrameIndex = this.piskelController.getCurrentFrameIndex();
|
|
||||||
this.currentPiskelFramePickerWidget.setFrameIndex(currentFrameIndex + 1);
|
|
||||||
this.currentPiskelFramePickerWidget.setFirstFrameIndex(0);
|
|
||||||
|
|
||||||
this.insertModeContainer = this.container.querySelector('.insert-mode-container');
|
this.insertModeContainer = this.container.querySelector('.insert-mode-container');
|
||||||
this.addEventListener(this.insertModeContainer, 'change', this.onInsertModeChange_);
|
this.addEventListener(this.insertModeContainer, 'change', this.onInsertModeChange_);
|
||||||
@ -40,7 +35,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ns.InsertLocation.prototype.onShow = function () {
|
ns.InsertLocation.prototype.onShow = function () {
|
||||||
// Nothing to do here!
|
this.currentPiskelFramePickerWidget.init();
|
||||||
|
var currentFrameIndex = this.piskelController.getCurrentFrameIndex();
|
||||||
|
this.currentPiskelFramePickerWidget.setFrameIndex(currentFrameIndex + 1);
|
||||||
|
this.currentPiskelFramePickerWidget.setFirstFrameIndex(0);
|
||||||
|
|
||||||
this.superclass.onShow.call(this);
|
this.superclass.onShow.call(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user