diff --git a/ui (gen4)/Makefile b/ui (gen4)/Makefile index 2b82364e..bdf708f0 100755 --- a/ui (gen4)/Makefile +++ b/ui (gen4)/Makefile @@ -513,13 +513,14 @@ $(DIST_DIR)/$(APP_NAME)-%.msi: $(BUILD_DIR)/$(APP_NAME)-% $(BUILD_DIR)/$(APP_NAM #---------------------------------------------------------------------- -# Debian package... +# deb/rpm package... # XXX #---------------------------------------------------------------------- -# Mobile (cordova/PhoneGap) XXX +# Mobile (cordova/PhoneGap)... +# XXX diff --git a/ui (gen4)/experiments/image-crop-edit.html b/ui (gen4)/experiments/image-crop-edit.html index a4ae066c..a9e3a05f 100755 --- a/ui (gen4)/experiments/image-crop-edit.html +++ b/ui (gen4)/experiments/image-crop-edit.html @@ -101,7 +101,11 @@ $(function(){ function setRatio(ratio){ var crop = $('.crop') + + crop .resizable("option", "aspectRatio", ratio) + // XXX this feels like a hack but it works... + .data('uiResizable')._aspectRatio = ratio if(ratio === false){ return @@ -122,8 +126,19 @@ function setRatio(ratio){ function flip(){ var crop = $('.crop') var r = crop.resizable("option", "aspectRatio") - r > 0 - && setRatio(1/r) + + if(r > 0){ + setRatio(1/r) + + // no aspect ratio defined, just switch... + } else { + var w = crop.width() + var h = crop.height() + + crop + .height(w) + .width(h) + } }