mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
adding .options.renderUnique...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
75548691d5
commit
b77f678805
@ -1181,6 +1181,10 @@ var BaseBrowserPrototype = {
|
||||
// If true item keys must be unique...
|
||||
uniqueKeys: false,
|
||||
|
||||
// if true do not render an item more than once...
|
||||
renderUnique: false,
|
||||
|
||||
|
||||
// Controls how the disabled sub-tree root elements are skipped...
|
||||
//
|
||||
// Can be:
|
||||
@ -3114,6 +3118,10 @@ var BaseBrowserPrototype = {
|
||||
section[0]
|
||||
: section
|
||||
|
||||
var seen = options.renderUnique ?
|
||||
(context.seen = context.seen || new Set())
|
||||
: false
|
||||
|
||||
// build range bounds...
|
||||
// use .get(..) on full (non-partial) range...
|
||||
var get_options = Object.assign(
|
||||
@ -3122,7 +3130,7 @@ var BaseBrowserPrototype = {
|
||||
// .iterateNonIterable here it is not seen down the line...
|
||||
{from: null, to: null, around: null,
|
||||
iterateNonIterable: options.iterateNonIterable})
|
||||
|
||||
|
||||
// index getter...
|
||||
var normIndex = function(i){
|
||||
return (i === undefined || typeof(i) == typeof(123)) ?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user