mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
tweaking and revising...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
430687a844
commit
e896cc0640
@ -152,7 +152,7 @@ requirejs([
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
dialog_1.parent = $('.container').first()[0]
|
dialog_1.container = $('.container').first()[0]
|
||||||
|
|
||||||
dialog_1.render()
|
dialog_1.render()
|
||||||
|
|
||||||
|
|||||||
@ -253,6 +253,8 @@ var BaseBrowserPrototype = {
|
|||||||
noDuplicateValues: false,
|
noDuplicateValues: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
parent: null,
|
||||||
|
|
||||||
//
|
//
|
||||||
// Format:
|
// Format:
|
||||||
// [
|
// [
|
||||||
@ -789,6 +791,8 @@ var BaseBrowserPrototype = {
|
|||||||
.slice()
|
.slice()
|
||||||
.forEach(function(handler){
|
.forEach(function(handler){
|
||||||
handler.call(that, evt, ...args) })
|
handler.call(that, evt, ...args) })
|
||||||
|
// XXX should we trigger the parent event????
|
||||||
|
//this.parent.trigger(evt, ...args)
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -942,14 +946,16 @@ var BrowserPrototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// parent element (optional)...
|
// parent element (optional)...
|
||||||
get parent(){
|
// XXX rename???
|
||||||
return this.__parent
|
// ... should this be .containerDom or .parentDom???
|
||||||
|
get container(){
|
||||||
|
return this.__container
|
||||||
|| (this.__dom ?
|
|| (this.__dom ?
|
||||||
this.__dom.parentElement
|
this.__dom.parentElement
|
||||||
: undefined) },
|
: undefined) },
|
||||||
set parent(value){
|
set container(value){
|
||||||
var dom = this.dom
|
var dom = this.dom
|
||||||
this.__parent = value
|
this.__container = value
|
||||||
// transfer the dom to the new parent...
|
// transfer the dom to the new parent...
|
||||||
dom && (this.dom = dom)
|
dom && (this.dom = dom)
|
||||||
},
|
},
|
||||||
@ -958,10 +964,10 @@ var BrowserPrototype = {
|
|||||||
get dom(){
|
get dom(){
|
||||||
return this.__dom },
|
return this.__dom },
|
||||||
set dom(value){
|
set dom(value){
|
||||||
this.parent
|
this.container
|
||||||
&& (this.__dom ?
|
&& (this.__dom ?
|
||||||
this.parent.replaceChild(value, this.__dom)
|
this.container.replaceChild(value, this.__dom)
|
||||||
: this.parent.appendChild(value))
|
: this.container.appendChild(value))
|
||||||
this.__dom = value },
|
this.__dom = value },
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user