more refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-05-14 17:42:17 +04:00
parent 1188955b39
commit 8b34dfed42
7 changed files with 22 additions and 27 deletions

View File

@ -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

View File

@ -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>

View File

@ -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)
})
}

View File

@ -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 -->

View File

@ -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>

View File

@ -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 :