Hide menu on zoom

This commit is contained in:
drdev
2014-08-01 15:53:58 +00:00
parent 988800940b
commit e7dee60016

View File

@@ -203,20 +203,22 @@ public abstract class FDropDown extends FScrollPane {
@Override @Override
public boolean pan(float x, float y, float deltaX, float deltaY, boolean moreVertical) { public boolean pan(float x, float y, float deltaX, float deltaY, boolean moreVertical) {
if (!isVisible()) { return false; }
hide(); //always hide if backdrop panned hide(); //always hide if backdrop panned
return false; //allow pan to pass through to object behind backdrop return false; //allow pan to pass through to object behind backdrop
} }
@Override @Override
public boolean fling(float velocityX, float velocityY) { public boolean fling(float velocityX, float velocityY) {
if (!isVisible()) { return false; }
hide(); //always hide if backdrop flung hide(); //always hide if backdrop flung
return false; //allow fling to pass through to object behind backdrop return false; //allow fling to pass through to object behind backdrop
} }
@Override
public boolean zoom(float x, float y, float amount) {
hide(); //always hide if backdrop zoomed
return false; //allow zoom to pass through to object behind backdrop
}
@Override @Override
public void draw(Graphics g) { public void draw(Graphics g) {
//draw nothing for backdrop //draw nothing for backdrop