mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
started work on .alignToRibbon(..), still a bit buggy...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4d095ea351
commit
9cfab342e5
@ -584,6 +584,14 @@ actions.Actions({
|
|||||||
function(target){ this.flip(target, 'vertical') }],
|
function(target){ this.flip(target, 'vertical') }],
|
||||||
flipHorizontal: ['Image|Edit/Flip image horizontally',
|
flipHorizontal: ['Image|Edit/Flip image horizontally',
|
||||||
function(target){ this.flip(target, 'horizontal') }],
|
function(target){ this.flip(target, 'horizontal') }],
|
||||||
|
|
||||||
|
|
||||||
|
// complex operations...
|
||||||
|
// XXX align to ribbon...
|
||||||
|
alignToRibbon: ['Edit/',
|
||||||
|
function(target, start, end){
|
||||||
|
this.data = this.data.alignToRibbon(target, start, end)
|
||||||
|
}],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -841,6 +841,7 @@ module.ViewerActions = actions.Actions({
|
|||||||
flipHorizontal: [
|
flipHorizontal: [
|
||||||
function(target){ this.ribbons.flipHorizontal(target, 'view') }],
|
function(target){ this.ribbons.flipHorizontal(target, 'view') }],
|
||||||
|
|
||||||
|
alignToRibbon: [ reloadAfter(true) ],
|
||||||
|
|
||||||
// tags...
|
// tags...
|
||||||
tag: [
|
tag: [
|
||||||
|
|||||||
@ -2045,7 +2045,11 @@ var DataPrototype = {
|
|||||||
// NOTE: this will not affect the original data object...
|
// NOTE: this will not affect the original data object...
|
||||||
// NOTE: this might result in empty ribbons, if no images are in a
|
// NOTE: this might result in empty ribbons, if no images are in a
|
||||||
// given ribbon in the section to be split...
|
// given ribbon in the section to be split...
|
||||||
// NOTE: target must be a .getImage(..) compatible value.
|
// NOTE: target must be a .getImage(..) compatible value, for
|
||||||
|
// differences see next note.
|
||||||
|
// NOTE: if target is a number then it is treated as global index,
|
||||||
|
// similar to .getImageOrder(..) default but different form
|
||||||
|
// .getImage(..)
|
||||||
// NOTE: if no target is given this will assume the current image.
|
// NOTE: if no target is given this will assume the current image.
|
||||||
//
|
//
|
||||||
// XXX do .eachImageList(..)
|
// XXX do .eachImageList(..)
|
||||||
@ -2062,8 +2066,8 @@ var DataPrototype = {
|
|||||||
|
|
||||||
// NOTE: we modify tail here on each iteration...
|
// NOTE: we modify tail here on each iteration...
|
||||||
target.forEach(function(i){
|
target.forEach(function(i){
|
||||||
i = i >= that.order.length
|
i = i >= that.order.length ? tail.order.length
|
||||||
? tail.order.length
|
: typeof(i) == typeof(123) ? tail.getImageOrder(that.getImage(i, 'global'))
|
||||||
: tail.getImageOrder(that.getImage(i))
|
: tail.getImageOrder(that.getImage(i))
|
||||||
var n = new Data()
|
var n = new Data()
|
||||||
n.base = tail.base
|
n.base = tail.base
|
||||||
@ -2230,7 +2234,7 @@ var DataPrototype = {
|
|||||||
rest[0].setBase(0)
|
rest[0].setBase(0)
|
||||||
|
|
||||||
// join the resulting data to the base ribbon...
|
// join the resulting data to the base ribbon...
|
||||||
res = res.join(rest)
|
res = res[0].join(rest)
|
||||||
|
|
||||||
// transfer data to new data object...
|
// transfer data to new data object...
|
||||||
res.current = this.current
|
res.current = this.current
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user