mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-19 09:41:40 +00:00
minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9fe814120e
commit
5a8f676fbe
@ -196,12 +196,22 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
// Select a list element...
|
// Select a list element...
|
||||||
//
|
//
|
||||||
|
// Get selected element if it exists, otherwise select and return
|
||||||
|
// the first...
|
||||||
|
// .select()
|
||||||
|
// -> elem
|
||||||
|
//
|
||||||
|
// Get selected element if it exists, null otherwise...
|
||||||
|
// .select('!')
|
||||||
|
// -> elem
|
||||||
|
// -> $()
|
||||||
|
//
|
||||||
// Select first/last child
|
// Select first/last child
|
||||||
// .select('first')
|
// .select('first')
|
||||||
// .select('last')
|
// .select('last')
|
||||||
// -> elem
|
// -> elem
|
||||||
//
|
//
|
||||||
// Select previous/lext child
|
// Select previous/next child
|
||||||
// .select('prev')
|
// .select('prev')
|
||||||
// .select('next')
|
// .select('next')
|
||||||
// -> elem
|
// -> elem
|
||||||
@ -210,11 +220,6 @@ var BrowserPrototype = {
|
|||||||
// .select('none')
|
// .select('none')
|
||||||
// -> elem
|
// -> elem
|
||||||
//
|
//
|
||||||
// Get selected element if it exists, null otherwise...
|
|
||||||
// .select('!')
|
|
||||||
// -> elem
|
|
||||||
// -> $()
|
|
||||||
//
|
|
||||||
// Select element by sequence number
|
// Select element by sequence number
|
||||||
// .select(<number>)
|
// .select(<number>)
|
||||||
// -> elem
|
// -> elem
|
||||||
@ -288,6 +293,24 @@ var BrowserPrototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Select next element...
|
||||||
|
next: function(elem){
|
||||||
|
if(elem != null){
|
||||||
|
this.select(elem)
|
||||||
|
}
|
||||||
|
this.select('next')
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
// Select previous element...
|
||||||
|
prev: function(elem){
|
||||||
|
if(elem != null){
|
||||||
|
this.select(elem)
|
||||||
|
}
|
||||||
|
this.select('prev')
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
|
||||||
|
// Push an element to path / go down one level...
|
||||||
push: function(elem){
|
push: function(elem){
|
||||||
var browser = this.dom
|
var browser = this.dom
|
||||||
var elem = this.select(elem || '!')
|
var elem = this.select(elem || '!')
|
||||||
@ -314,7 +337,7 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
// pop an element off the path / go up one level...
|
// Pop an element off the path / go up one level...
|
||||||
pop: function(){
|
pop: function(){
|
||||||
var browser = this.dom
|
var browser = this.dom
|
||||||
var path = this.path
|
var path = this.path
|
||||||
@ -326,20 +349,6 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
next: function(elem){
|
|
||||||
if(elem != null){
|
|
||||||
this.select(elem)
|
|
||||||
}
|
|
||||||
this.select('next')
|
|
||||||
return this
|
|
||||||
},
|
|
||||||
prev: function(elem){
|
|
||||||
if(elem != null){
|
|
||||||
this.select(elem)
|
|
||||||
}
|
|
||||||
this.select('prev')
|
|
||||||
return this
|
|
||||||
},
|
|
||||||
|
|
||||||
focus: function(){
|
focus: function(){
|
||||||
this.dom.focus()
|
this.dom.focus()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user