mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
more refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1188955b39
commit
8b34dfed42
@ -198,7 +198,6 @@ function getImageGIDs(from, count, ribbon, inclusive){
|
||||
// XXX check if this is empty...
|
||||
ribbon = DATA.ribbons[ribbon]
|
||||
|
||||
|
||||
if(count > 0){
|
||||
var c = inclusive == null ? 1 : 0
|
||||
var start = ribbon.indexOf(from) + c
|
||||
@ -36,7 +36,6 @@ body {
|
||||
<!-- XXX STUB -->
|
||||
<script src="images.js"></script>
|
||||
<script src="gallery-prototype.js"></script>
|
||||
<script src="ui.js"></script>
|
||||
<script src="persistance.js"></script>
|
||||
|
||||
<script src="markers.js"></script>
|
||||
|
||||
@ -1098,6 +1098,25 @@ function alignRibbons(){
|
||||
}
|
||||
}
|
||||
|
||||
// XXX need to make this work for % values...
|
||||
// XXX make this usable as an event handler for .resize(...) event...
|
||||
function fieldSize(W, H){
|
||||
var oW = $('.container').width()
|
||||
var oH = $('.container').height()
|
||||
|
||||
var scale = getElementScale($('.field'))
|
||||
|
||||
$('.container').css({
|
||||
'width': W,
|
||||
'height': H
|
||||
})
|
||||
|
||||
// shift the field...
|
||||
$('.field').css({
|
||||
'margin-top': (parseFloat($('.field').css('margin-top')) + (H-oH)/2),
|
||||
'margin-left': (parseFloat($('.field').css('margin-left')) + (W-oW)/2)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,6 @@ body {
|
||||
<!-- XXX STUB -->
|
||||
<script src="images.js"></script>
|
||||
<script src="gallery-prototype.js"></script>
|
||||
<script src="ui.js"></script>
|
||||
<script src="markers.js"></script>
|
||||
|
||||
<!-- keep this after anything it uses -->
|
||||
|
||||
@ -230,8 +230,9 @@
|
||||
<script src="lib/jli.js"></script>
|
||||
<script src="lib/keyboard.js"></script>
|
||||
|
||||
<script src="ImageGrid.js"></script>
|
||||
<script src="ImageGrid.data.js"></script>
|
||||
<script src="base.js"></script>
|
||||
<script src="data.js"></script>
|
||||
<script src="ui.js"></script>
|
||||
<script src="keybindings3.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
22
ui/ui.js
22
ui/ui.js
@ -1,26 +1,4 @@
|
||||
/*********************************************************************/
|
||||
|
||||
// XXX need to make this work for % values...
|
||||
// XXX make this usable as an event handler for .resize(...) event...
|
||||
function fieldSize(W, H){
|
||||
var oW = $('.container').width()
|
||||
var oH = $('.container').height()
|
||||
|
||||
var scale = getElementScale($('.field'))
|
||||
|
||||
$('.container').css({
|
||||
'width': W,
|
||||
'height': H
|
||||
})
|
||||
|
||||
// shift the field...
|
||||
$('.field').css({
|
||||
'margin-top': (parseFloat($('.field').css('margin-top')) + (H-oH)/2),
|
||||
'margin-left': (parseFloat($('.field').css('margin-left')) + (W-oW)/2)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*********************************************************************/
|
||||
// vim:set ts=4 sw=4 nowrap :
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user