Closed R-II closed 9 years ago
Hi Raphël, Thanks for this new PR!
Hi Raph,
Just some questions/remarks about your last PR:
thumbnailSelectionEnd()
I'm not really sure why this is needed...
The entire items array is scanned twice. Couldn't it be optimized? https://developer.mozilla.org/fr/docs/Web/CSS/user-select
and https://developer.mozilla.org/fr/docs/Web/CSS/-webkit-touch-callout
Hi Kris,
"fresh" items: only fresh items are displayed. On each load/reload of a gallery, every existing items see their "fresh" property set to false, every parsed items in the source JSON are set at fresh = true, the remaining fresh = false are not displayed. This is how I managed to support items removal.
The thumbnailSelectionEnd() method has been created to handle the end of selection. This function adds a "selectable" class on thumbnails that can be selected (making customisation easier) and runs the fnChangeSelectMode when the selection mode is activated or deactivated. For sure, if you can optimize it, do not hesitate :-)
'user-select' and '-webkit-touch-callout' are used because of the iOS devices: on a long touch on an item, it is selected and the context menu appears. "touch-callout" forbid the context menu to open, "user-select" forbid the selection. These are not yet standard properties, but they make the script responsive and does not cause any problems on desktop browsers.
OK for IE8, I'll try to keep that in mind.
Raph
Hi Raph,
Thanks for all these details!
I allowed myself to made some changes in the support of items removal in reload... I just set the item.albumID to -1 (means not in any album = orphan). Then on reload, the correct albumID is set again if the item still exists. New version is uploaded.
Kris
Hi Kris,
Here is my last hack.
Add: 'fresh' property on items Add: show only 'fresh' items Fix: class name on 'light' theme
Enjoy :) Raphaël