mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
notes and minor tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1da1cb8114
commit
a3298d13a9
@ -437,12 +437,11 @@ Items.DisplayItemInfo = function(make, options){
|
|||||||
|
|
||||||
var BaseItemClassPrototype = {
|
var BaseItemClassPrototype = {
|
||||||
text: function(elem){
|
text: function(elem){
|
||||||
var txt = elem.value instanceof Array ?
|
return elem.value instanceof Array ?
|
||||||
elem.value.join(' ')
|
elem.value.join(' ')
|
||||||
: elem.value == null || elem.value instanceof Object ?
|
: elem.value == null || elem.value instanceof Object ?
|
||||||
elem.alt || elem.__id
|
elem.alt || elem.__id
|
||||||
: elem.value
|
: elem.value },
|
||||||
return txt },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var BaseItemPrototype = {
|
var BaseItemPrototype = {
|
||||||
@ -461,11 +460,16 @@ var BaseItemPrototype = {
|
|||||||
// selected: null,
|
// selected: null,
|
||||||
// collapsed: null,
|
// collapsed: null,
|
||||||
|
|
||||||
|
// item id if explicitly set otherwise its .text...
|
||||||
|
//
|
||||||
|
// NOTE: this will not fall into infinite recursion with .text as
|
||||||
|
// the later accesses .__id directly...
|
||||||
get id(){
|
get id(){
|
||||||
return this.__id || this.text },
|
return this.__id || this.text },
|
||||||
set id(value){
|
set id(value){
|
||||||
this.__id = value },
|
this.__id = value },
|
||||||
|
|
||||||
|
// normalized .value, .alt or .__id
|
||||||
get text(){
|
get text(){
|
||||||
return this.constructor.text(this) },
|
return this.constructor.text(this) },
|
||||||
|
|
||||||
@ -1180,9 +1184,20 @@ var BaseBrowserPrototype = {
|
|||||||
allowSecondaySectionFocus: false,
|
allowSecondaySectionFocus: false,
|
||||||
|
|
||||||
// If true item keys must be unique...
|
// If true item keys must be unique...
|
||||||
|
//
|
||||||
|
// If false and two items have the same key but no .id set a unique
|
||||||
|
// .id will be generated to distinguish the items.
|
||||||
|
//
|
||||||
|
// NOTE: item.id is still required to be unique.
|
||||||
|
// NOTE: see .__key__(..) and .__id__(..) for key/id generation
|
||||||
|
// specifics.
|
||||||
|
//
|
||||||
|
// default: false
|
||||||
uniqueKeys: false,
|
uniqueKeys: false,
|
||||||
|
|
||||||
// if true do not render an item more than once...
|
// if true do not render an item more than once...
|
||||||
|
//
|
||||||
|
// default: true
|
||||||
renderUnique: true,
|
renderUnique: true,
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user