mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
fixed current image indicator scaling...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c53f7c4eda
commit
8f96973726
@ -164,14 +164,15 @@ var CurrentImageIndicatorActions = actions.Actions({
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateCurrentImageIndicator: ['- Interface/Update current image indicator',
|
updateCurrentImageIndicator: ['- Interface/Update current image indicator',
|
||||||
function(target, update_border){
|
function(target, update_border, scale){
|
||||||
var ribbon_set = this.ribbons.getRibbonSet()
|
var ribbon_set = this.ribbons.getRibbonSet()
|
||||||
|
|
||||||
if(ribbon_set.length == 0){
|
if(ribbon_set.length == 0){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var scale = this.scale
|
scale = scale || this.scale
|
||||||
|
|
||||||
var cur = this.ribbons.getImage(target)
|
var cur = this.ribbons.getImage(target)
|
||||||
// NOTE: cur may be unloaded...
|
// NOTE: cur may be unloaded...
|
||||||
var ribbon = this.ribbons.getRibbon(cur.length > 0 ? target : this.currentRibbon)
|
var ribbon = this.ribbons.getRibbon(cur.length > 0 ? target : this.currentRibbon)
|
||||||
@ -244,7 +245,8 @@ var CurrentImageIndicatorActions = actions.Actions({
|
|||||||
|
|
||||||
// set border right away...
|
// set border right away...
|
||||||
if(update_border == 'before'){
|
if(update_border == 'before'){
|
||||||
css.borderWidth = border
|
//css.borderWidth = border
|
||||||
|
marker.css({ borderWidth: border })
|
||||||
|
|
||||||
// set border with a delay...
|
// set border with a delay...
|
||||||
// NOTE: this is to prevent the ugly border resize before
|
// NOTE: this is to prevent the ugly border resize before
|
||||||
@ -328,8 +330,11 @@ module.CurrentImageIndicator = core.ImageGridFeatures.Feature({
|
|||||||
w1 = w1 || 1
|
w1 = w1 || 1
|
||||||
|
|
||||||
w0 > w1
|
w0 > w1
|
||||||
&& this.updateCurrentImageIndicator(null, 'before')
|
&& this.updateCurrentImageIndicator(null,
|
||||||
//&& console.log('BEFORE!!!!')
|
'before',
|
||||||
|
// NOTE: we need to get the target scale as we
|
||||||
|
// have not started resizing yet...
|
||||||
|
(w0 / w1) * this.scale)
|
||||||
}],
|
}],
|
||||||
['resizingDone',
|
['resizingDone',
|
||||||
function(){
|
function(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user