some cleanup, notes + added ig.attached DOM event...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-03-06 02:37:32 +03:00
parent 2733416cd4
commit 63a890a877
4 changed files with 17 additions and 4 deletions

View File

@ -80,6 +80,8 @@ var RenderActions = actions.Actions({
// XXX is this correct???
//this.ribbons.__image_updaters = [this.updateImage.bind(this)]
this.dom.trigger('ig.attached')
} else {
//this.ribbons.clear()
this.ribbons.images = this.images

View File

@ -236,6 +236,8 @@ var RenderActions = actions.Actions({
// XXX is this correct???
//this.ribbons.__image_updaters = [this.updateImage.bind(this)]
this.dom.trigger('ig.attached')
} else {
//this.ribbons.clear()
this.ribbons.images = this.images

View File

@ -127,6 +127,8 @@ actions.Actions({
// XXX is this correct???
this.ribbons.__image_updaters = [this.updateImage.bind(this)]
this.dom.trigger('ig.attached')
} else {
this.ribbons.clear()
this.ribbons.images = this.images

View File

@ -711,9 +711,16 @@ module.Viewer = core.ImageGridFeatures.Feature({
handlers: [
// bind system events to dom...
//
// XXX add:
// ig.created
// ig.ready
// Events:
// ig.attached
// triggered when ImageGrid instance is attached to dom...
// ig.start / ig.start.pre / ig.start.post
// ig.ready
// ig.stop / ig.stop.pre / ig.stop.post
//
// NOTE: ig.attached is triggered by the 'ui-render' implementation...
// NOTE: there is intentionally not pre/post ready events. (???
//
// XXX should these be imagegrid.event or ig.event??
['start.pre',
function(){
@ -736,6 +743,7 @@ module.Viewer = core.ImageGridFeatures.Feature({
}
}],
// workspaces and resizing...
['start',
function(){
var that = this
@ -802,7 +810,6 @@ module.Viewer = core.ImageGridFeatures.Feature({
'addClass'
: 'removeClass']('crop-mode')
}],
],
})