-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal Scroll Bar does not work correctly with LineNumberFactory #1030
Comments
The line number label must move by breadth offset when the view port moves. Currently the offset is updated several times and one update is 0 which keeps the line number at the beginning of the virtual flow. Original: private final ChangeListener<Double> hbarValueListener;
private final ChangeListener<Double> hPosEstimateListener;
private Var<Double> hbarValue;
private Var<Double> hPosEstimate;
hbarValueListener = (observable, oldValue, newValue) -> hPosEstimate.setValue(newValue);
hbarValue.addListener(hbarValueListener);
hPosEstimateListener = (observable, oldValue, newValue) -> hbarValue.setValue(newValue);
hPosEstimate.addListener(hPosEstimateListener); Changed: private ChangeListener<Double> hbarValueListener;
private ChangeListener<Double> hPosEstimateListener;
private Var<Double> hbarValue;
private Var<Double> hPosEstimate;
hbarValueListener = (observable, oldValue, newValue) -> {
hPosEstimate.removeListener(hPosEstimateListener);
hPosEstimate.setValue(newValue);
hPosEstimate.addListener(hPosEstimateListener);
};
hbarValue.addListener(hbarValueListener);
hPosEstimateListener = (observable, oldValue, newValue) -> {
hbarValue.removeListener(hbarValueListener);
hbarValue.setValue(newValue);
hbarValue.addListener(hbarValueListener);
};
hPosEstimate.addListener(hPosEstimateListener); |
@appsofteng thanks very much for this, have submitted a PR in Flowless to fix this. |
Expected Behavior
CodeArea always showing caret (scrolling to visible) on keyboard moving (left/right buttons)
Actual Behavior
CodeArea not showing caret on keyboard moving (left/right buttons). Scroll begin moving only after few keyboard "right" button clicks, looks depended on LineNumberFactory nodes width
Reproducible Demo
Environment info:
The text was updated successfully, but these errors were encountered: