mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 19:00:09 +00:00 
			
		
		
		
	some minor changes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									2fe109a95f
								
							
						
					
					
						commit
						1cfdaaeda1
					
				| @ -407,7 +407,7 @@ module.ImagesPrototype = { | ||||
| 		//size = size == null ? getVisibleImageSize('max') : size
 | ||||
| 		img_data = img_data == null ? this[gid] : img_data | ||||
| 
 | ||||
| 		// XXX if no usable images are available use STUB data...
 | ||||
| 		// if no usable images are available use STUB data...
 | ||||
| 		if((img_data.preview == null  | ||||
| 					|| Object.keys(img_data.preview).length == 0) | ||||
| 				&& img_data.path == null){ | ||||
|  | ||||
| @ -47,29 +47,29 @@ | ||||
| } | ||||
| 
 | ||||
| .viewer:not(.no-transitions) .ribbon-set:not(.no-transitions) { | ||||
| 	-webkit-transition: all 0.2s linear, transform 0.2s linear; | ||||
| 	-moz-transition: all 0.2s linear, transform 0.2s linear; | ||||
| 	-ms-transition: all 0.2s linear, transform 0.2s linear; | ||||
| 	-o-transition: all 0.2s linear, transform 0.2s linear; | ||||
| 	transition: all 0.2s linear, transform 0.2s linear; | ||||
| 	-webkit-transition: all 0.1s linear, transform 0.1s linear; | ||||
| 	-moz-transition: all 0.1s linear, transform 0.1s linear; | ||||
| 	-ms-transition: all 0.1s linear, transform 0.1s linear; | ||||
| 	-o-transition: all 0.1s linear, transform 0.1s linear; | ||||
| 	transition: all 0.1s linear, transform 0.1s linear; | ||||
| } | ||||
| 
 | ||||
| .viewer:not(.no-transitions) .ribbon:not(.no-transitions) { | ||||
| 	-webkit-transition: all 0.2s ease-out; | ||||
| 	-moz-transition: all 0.2s ease-out; | ||||
| 	-ms-transition: all 0.2s ease-out; | ||||
| 	-o-transition: all 0.2s ease-out; | ||||
| 	transition: all 0.2s ease-out; | ||||
| 	-webkit-transition: all 0.1s ease-out; | ||||
| 	-moz-transition: all 0.1s ease-out; | ||||
| 	-ms-transition: all 0.1s ease-out; | ||||
| 	-o-transition: all 0.1s ease-out; | ||||
| 	transition: all 0.1s ease-out; | ||||
| } | ||||
| 
 | ||||
| /* XXX not 100% sure about this... | ||||
| */ | ||||
| .current-marker:not(.no-transitions) { | ||||
| 	-webkit-transition: left 0.2s ease-out; | ||||
| 	-moz-transition: left 0.2s ease-out; | ||||
| 	-ms-transition: left 0.2s ease-out; | ||||
| 	-o-transition: left 0.2s ease-out; | ||||
| 	transition: left 0.2s ease-out; | ||||
| 	-webkit-transition: left 0.1s ease-out; | ||||
| 	-moz-transition: left 0.1s ease-out; | ||||
| 	-ms-transition: left 0.1s ease-out; | ||||
| 	-o-transition: left 0.1s ease-out; | ||||
| 	transition: left 0.1s ease-out; | ||||
| } | ||||
| 
 | ||||
| /* XXX should this be !important */ | ||||
|  | ||||
| @ -568,8 +568,8 @@ module.MetaActions = { | ||||
| 	// Mixin a set of local actions into an object...
 | ||||
| 	//
 | ||||
| 	// XXX test
 | ||||
| 	mixinTo: function(to, all, all_attr_types){ | ||||
| 		return this.mixin.call(to, this, all, all_attr_types) | ||||
| 	mixinTo: function(to, all, descriptors, all_attr_types){ | ||||
| 		return this.mixin.call(to, this, all, descriptors, all_attr_types) | ||||
| 	}, | ||||
| 
 | ||||
| 
 | ||||
| @ -582,7 +582,7 @@ module.MetaActions = { | ||||
| 	//
 | ||||
| 	// XXX not sure about these...
 | ||||
| 	// XXX test
 | ||||
| 	mixout: function(from, all, all_attr_types){ | ||||
| 	mixout: function(from, all, descriptors, all_attr_types){ | ||||
| 		// defaults...
 | ||||
| 		descriptors = descriptors || true | ||||
| 		all_attr_types = all_attr_types || false | ||||
| @ -624,8 +624,8 @@ module.MetaActions = { | ||||
| 	// Remove a set of local mixed in actions from object...
 | ||||
| 	//
 | ||||
| 	// XXX test
 | ||||
| 	mixoutFrom: function(to, all, all_attr_types){ | ||||
| 		return this.mixout.call(to, this, all, all_attr_types) | ||||
| 	mixoutFrom: function(to, all, descriptors, all_attr_types){ | ||||
| 		return this.mixout.call(to, this, all, descriptors, all_attr_types) | ||||
| 	}, | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -862,11 +862,15 @@ actions.Actions(Client, { | ||||
| 		function(){ | ||||
| 			// NOTE: the 0.2 is added to compensate for alignment/scaling
 | ||||
| 			// 		errors -- 2.99 images wide counts as 3 while 2.5 as 2.
 | ||||
| 			this.prevImage(Math.floor(this.ribbons.getScreenWidthImages() + 0.2)) | ||||
| 			var w = Math.floor(this.ribbons.getScreenWidthImages() + 0.2) | ||||
| 			w += (w % 2) - 1 | ||||
| 			this.prevImage(w) | ||||
| 		}], | ||||
| 	nextScreen: ['Focus next image one screen width away', | ||||
| 		function(){ | ||||
| 			this.nextImage(Math.floor(this.ribbons.getScreenWidthImages() + 0.2)) | ||||
| 			var w = Math.floor(this.ribbons.getScreenWidthImages() + 0.2) | ||||
| 			w += (w % 2) - 1 | ||||
| 			this.nextImage(w) | ||||
| 		}], | ||||
| 
 | ||||
| 	// zooming...
 | ||||
| @ -1186,10 +1190,13 @@ var PartialRibbonsActions = actions.Actions({ | ||||
| 			var pa = this.data.getImages(target, size, 'before').length - 1 | ||||
| 
 | ||||
| 			// do the update...
 | ||||
| 			// the target is not loaded...
 | ||||
| 			if(this.ribbons.getImage(target).length == 0){ | ||||
| 				this.resizeRibbon(target, size) | ||||
| 
 | ||||
| 			// do a late resize...
 | ||||
| 			// loaded more than we need (crop?)...
 | ||||
| 			if(na + pa < nl + pl | ||||
| 					// the target is not loaded...
 | ||||
| 					|| this.ribbons.getImage(target).length == 0 | ||||
| 			} else if(na + pa < nl + pl | ||||
| 					// passed threshold on the right...
 | ||||
| 					|| (nl < threshold && na > nl)  | ||||
| 					// passed threshold on the left...
 | ||||
| @ -1197,7 +1204,11 @@ var PartialRibbonsActions = actions.Actions({ | ||||
| 					// loaded more than we need by threshold...
 | ||||
| 					|| nl + pl + 1 > size + threshold){ | ||||
| 
 | ||||
| 				this.resizeRibbon(target, size) | ||||
| 				// XXX this still causes jitter in animation, sometime 
 | ||||
| 				// 		even skipping the whole sequence...
 | ||||
| 				return function(){ | ||||
| 					this.resizeRibbon(target, size) | ||||
| 				} | ||||
| 			} | ||||
| 		}], | ||||
| 	resizeRibbon: ['Resize ribbon to n images', | ||||
| @ -1633,7 +1644,7 @@ var CurrentImageIndicatorActions = actions.Actions({ | ||||
| 				// no marker exists -- create a marker...
 | ||||
| 				if(marker.length == 0){ | ||||
| 					var marker = $('<div/>') | ||||
| 						.addClass('current-marker '+ this.tag) | ||||
| 						.addClass('current-marker ui-current-image-indicator') | ||||
| 						.css({ | ||||
| 							opacity: '0', | ||||
| 							top: '0px', | ||||
| @ -1705,7 +1716,7 @@ module.CurrentImageIndicator = Feature({ | ||||
| 
 | ||||
| 	handlers: [ | ||||
| 		// move marker to current image...
 | ||||
| 		[ 'focusImage.post', | ||||
| 		['focusImage.post', | ||||
| 			function(){ this.updateCurrentImageIndicator() }], | ||||
| 		// prevent animations when focusing ribbons...
 | ||||
| 		['focusRibbon.pre', | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user