notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8e6cf6e545
commit
58fb43531b
15
index.html
15
index.html
@ -40,10 +40,23 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
var setupGallery = function(gallery){
|
var setupGallery = function(gallery){
|
||||||
|
|
||||||
|
// handle clicks....
|
||||||
|
//
|
||||||
|
// NOTE: a good way to separate selection and viewing is to use
|
||||||
|
// evt.shiftKey, i.e:
|
||||||
|
// - normal click sets view mode
|
||||||
|
// - shift+click selects image
|
||||||
|
// and it would be good to implement the expected selection API:
|
||||||
|
// ctrl+a - select all
|
||||||
|
// ctrl+d - deselect all
|
||||||
|
// arrows - navigation
|
||||||
|
// shift+arrows - navigation selection
|
||||||
|
// ...
|
||||||
gallery.addEventListener('click', function(evt){
|
gallery.addEventListener('click', function(evt){
|
||||||
var target = evt.target
|
var target = evt.target
|
||||||
|
|
||||||
console.log('--- EVENT:', evt)
|
//console.log('--- EVENT:', evt)
|
||||||
|
|
||||||
if(target.tagName.toLowerCase() == 'img'){
|
if(target.tagName.toLowerCase() == 'img'){
|
||||||
var clicked = target
|
var clicked = target
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user