ItEr22S12CUVistaRecursosTempoPorProxectoItEr21S07: The scroll position is changed proportionally when the zoom changes

This commit is contained in:
Óscar González Fernández 2009-08-23 13:57:23 +02:00
parent a05f51a9d1
commit d56543539e
2 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import org.zkoss.ganttz.Planner;
import org.zkoss.ganttz.TimeTracker;
import org.zkoss.ganttz.TimeTrackerComponent;
import org.zkoss.ganttz.data.resourceload.LoadTimelinesGroup;
import org.zkoss.zk.au.out.AuInvoke;
import org.zkoss.zk.ui.ext.AfterCompose;
import org.zkoss.zul.impl.XulElement;
@ -36,7 +37,9 @@ public class ResourcesLoadPanel extends XulElement implements AfterCompose {
@Override
protected void scrollHorizontalPercentage(int pixelsDisplacement) {
// TODO do the scroll displacement
response("", new AuInvoke(resourceLoadList,
"adjustScrollHorizontalPosition", pixelsDisplacement
+ ""));
}
};
}

View file

@ -39,5 +39,9 @@ function addResourcesLoadListMethods(object) {
});
};
object.adjustScrollHorizontalPosition = function(cmp, offsetInPx) {
cmp.scrollLeft = offsetInPx;
}
return object;
}