mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
some cleanup, notes + added ig.attached DOM event...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2733416cd4
commit
63a890a877
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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')
|
||||
}],
|
||||
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user