mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +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???
|
// XXX is this correct???
|
||||||
//this.ribbons.__image_updaters = [this.updateImage.bind(this)]
|
//this.ribbons.__image_updaters = [this.updateImage.bind(this)]
|
||||||
|
|
||||||
|
this.dom.trigger('ig.attached')
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//this.ribbons.clear()
|
//this.ribbons.clear()
|
||||||
this.ribbons.images = this.images
|
this.ribbons.images = this.images
|
||||||
|
|||||||
@ -236,6 +236,8 @@ var RenderActions = actions.Actions({
|
|||||||
// XXX is this correct???
|
// XXX is this correct???
|
||||||
//this.ribbons.__image_updaters = [this.updateImage.bind(this)]
|
//this.ribbons.__image_updaters = [this.updateImage.bind(this)]
|
||||||
|
|
||||||
|
this.dom.trigger('ig.attached')
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//this.ribbons.clear()
|
//this.ribbons.clear()
|
||||||
this.ribbons.images = this.images
|
this.ribbons.images = this.images
|
||||||
|
|||||||
@ -127,6 +127,8 @@ actions.Actions({
|
|||||||
// XXX is this correct???
|
// XXX is this correct???
|
||||||
this.ribbons.__image_updaters = [this.updateImage.bind(this)]
|
this.ribbons.__image_updaters = [this.updateImage.bind(this)]
|
||||||
|
|
||||||
|
this.dom.trigger('ig.attached')
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.ribbons.clear()
|
this.ribbons.clear()
|
||||||
this.ribbons.images = this.images
|
this.ribbons.images = this.images
|
||||||
|
|||||||
@ -711,9 +711,16 @@ module.Viewer = core.ImageGridFeatures.Feature({
|
|||||||
handlers: [
|
handlers: [
|
||||||
// bind system events to dom...
|
// bind system events to dom...
|
||||||
//
|
//
|
||||||
// XXX add:
|
// Events:
|
||||||
// ig.created
|
// ig.attached
|
||||||
|
// triggered when ImageGrid instance is attached to dom...
|
||||||
|
// ig.start / ig.start.pre / ig.start.post
|
||||||
// ig.ready
|
// 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??
|
// XXX should these be imagegrid.event or ig.event??
|
||||||
['start.pre',
|
['start.pre',
|
||||||
function(){
|
function(){
|
||||||
@ -736,6 +743,7 @@ module.Viewer = core.ImageGridFeatures.Feature({
|
|||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
|
|
||||||
|
// workspaces and resizing...
|
||||||
['start',
|
['start',
|
||||||
function(){
|
function(){
|
||||||
var that = this
|
var that = this
|
||||||
@ -802,7 +810,6 @@ module.Viewer = core.ImageGridFeatures.Feature({
|
|||||||
'addClass'
|
'addClass'
|
||||||
: 'removeClass']('crop-mode')
|
: 'removeClass']('crop-mode')
|
||||||
}],
|
}],
|
||||||
|
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user