mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 02:40:08 +00:00
minor tweaks and fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1cc4cafc95
commit
15412b7cf5
@ -36,9 +36,16 @@
|
|||||||
|
|
||||||
-webkit-transition: all 0.1s ease-in;
|
-webkit-transition: all 0.1s ease-in;
|
||||||
-moz-transition: all 0.1s ease-in;
|
-moz-transition: all 0.1s ease-in;
|
||||||
|
-ms-transition: all 0.1s ease-in;
|
||||||
|
-o-transition: all 0.1s ease-in;
|
||||||
transition: all 0.1s ease-in;
|
transition: all 0.1s ease-in;
|
||||||
}
|
}
|
||||||
|
.shadow,
|
||||||
.shadow .image {
|
.shadow .image {
|
||||||
|
-webkit-transform-origin: 0 0;
|
||||||
|
-moz-transform-origin: 0 0;
|
||||||
|
-ms-transform-origin: 0 0;
|
||||||
|
-o-transform-origin: 0 0;
|
||||||
transform-origin: 0 0;
|
transform-origin: 0 0;
|
||||||
}
|
}
|
||||||
.image.moving {
|
.image.moving {
|
||||||
@ -49,18 +56,24 @@
|
|||||||
.viewer:not(.no-transitions) .ribbon-set {
|
.viewer:not(.no-transitions) .ribbon-set {
|
||||||
-webkit-transition: all 0.2s linear, transform 0.2s linear;
|
-webkit-transition: all 0.2s linear, transform 0.2s linear;
|
||||||
-moz-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;
|
transition: all 0.2s linear, transform 0.2s linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewer:not(.no-transitions) .ribbon {
|
.viewer:not(.no-transitions) .ribbon {
|
||||||
-webkit-transition: all 0.2s ease-out;
|
-webkit-transition: all 0.2s ease-out;
|
||||||
-moz-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;
|
transition: all 0.2s ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-transitions {
|
.no-transitions {
|
||||||
-webkit-transition: none;
|
-webkit-transition: none;
|
||||||
-moz-transition: none;
|
-moz-transition: none;
|
||||||
|
-ms-transition: none;
|
||||||
|
-o-transition: none;
|
||||||
transition: none;
|
transition: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -339,17 +339,17 @@ module.RibbonsPrototype = {
|
|||||||
var img = this.getImage(target)
|
var img = this.getImage(target)
|
||||||
var gid = this.getElemGID(img)
|
var gid = this.getElemGID(img)
|
||||||
var s = this.getScale()
|
var s = this.getScale()
|
||||||
var shadow = $('<div>')
|
var shadow = setElementScale($('<div>')
|
||||||
.addClass('shadow')
|
.addClass('shadow')
|
||||||
.append(setElementScale(
|
.append(
|
||||||
img
|
img
|
||||||
.clone()
|
.clone()
|
||||||
.removeClass('current')
|
.removeClass('current')
|
||||||
.attr('gid', null), s))
|
.attr('gid', null))
|
||||||
.css({
|
.css({
|
||||||
width: img.width()*s,
|
width: img.width(),
|
||||||
height: img.height()*s,
|
height: img.height(),
|
||||||
})
|
}), s)
|
||||||
.css(img.offset())
|
.css(img.offset())
|
||||||
.appendTo(this.viewer)
|
.appendTo(this.viewer)
|
||||||
img.addClass('moving')
|
img.addClass('moving')
|
||||||
|
|||||||
@ -190,15 +190,19 @@ actions.Actions({
|
|||||||
// basic ribbon editing...
|
// basic ribbon editing...
|
||||||
//
|
//
|
||||||
// NOTE: for all of these, current/ribbon image is a default...
|
// NOTE: for all of these, current/ribbon image is a default...
|
||||||
//
|
|
||||||
// XXX move this out to a mixin...
|
// XXX to be used for things like mark/place and dragging...
|
||||||
|
shiftImageTo: ['',
|
||||||
|
function(target, to){
|
||||||
|
// XXX
|
||||||
|
}],
|
||||||
|
|
||||||
shiftImageUp: ['Shift image up',
|
shiftImageUp: ['Shift image up',
|
||||||
'If implicitly shifting current image (i.e. no arguments), focus '
|
'If implicitly shifting current image (i.e. no arguments), focus '
|
||||||
+'will shift to the next or previous image in the current '
|
+'will shift to the next or previous image in the current '
|
||||||
+'ribbon depending on current direction.',
|
+'ribbon depending on current direction.',
|
||||||
function(target){
|
function(target){
|
||||||
// by default we need to update the current position...
|
// by default we need to focus another image in the same ribbon...
|
||||||
if(target == null){
|
if(target == null){
|
||||||
var direction = this.direction == 'right' ? 'next' : 'prev'
|
var direction = this.direction == 'right' ? 'next' : 'prev'
|
||||||
|
|
||||||
@ -221,7 +225,7 @@ actions.Actions({
|
|||||||
+'will shift to the next or previous image in the current '
|
+'will shift to the next or previous image in the current '
|
||||||
+'ribbon depending on current direction.',
|
+'ribbon depending on current direction.',
|
||||||
function(target){
|
function(target){
|
||||||
// by default we need to update the current position...
|
// by default we need to focus another image in the same ribbon...
|
||||||
if(target == null){
|
if(target == null){
|
||||||
var direction = this.direction == 'right' ? 'next' : 'prev'
|
var direction = this.direction == 'right' ? 'next' : 'prev'
|
||||||
|
|
||||||
@ -506,22 +510,28 @@ actions.Actions(Client, {
|
|||||||
function(){ }],
|
function(){ }],
|
||||||
|
|
||||||
|
|
||||||
// XXX these are cheating...
|
// XXX are these cheating???
|
||||||
shiftImageUp: [
|
shiftImageUp: [
|
||||||
function(target){
|
function(target){
|
||||||
|
// prevent animations form adding/removing ribbons...
|
||||||
this.ribbons.preventTransitions()
|
this.ribbons.preventTransitions()
|
||||||
|
|
||||||
return function(){
|
return function(){
|
||||||
this.ribbons.restoreTransitions()
|
this.ribbons.restoreTransitions()
|
||||||
|
// NOTE: this may seem like cheating, but .reload() should
|
||||||
|
// be very efficient, reusing all of the items loaded...
|
||||||
this.reload()
|
this.reload()
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
shiftImageDown: [
|
shiftImageDown: [
|
||||||
function(target){
|
function(target){
|
||||||
|
// prevent animations form adding/removing ribbons...
|
||||||
this.ribbons.preventTransitions()
|
this.ribbons.preventTransitions()
|
||||||
|
|
||||||
return function(){
|
return function(){
|
||||||
this.ribbons.restoreTransitions()
|
this.ribbons.restoreTransitions()
|
||||||
|
// NOTE: this may seem like cheating, but .reload() should
|
||||||
|
// be very efficient, reusing all of the items loaded...
|
||||||
this.reload()
|
this.reload()
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user