1
我正在使用嵌入JavaFX中的WebView中的ace編輯器,但在滾動時遇到了一個小問題。JavaFX中的Ace編輯器WebView滾動問題(大步長)
滾動不連續,而是跳步大步長。
如果有人遇到過這個問題並解決了這個問題?任何幫助,將不勝感激。 (以下是嵌入在webview中的ace編輯器演示)。
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class AceEditorExample extends Application {
@Override
public void start(Stage primaryStage) {
WebView webView = new WebView();
webView.getEngine().load("https://ace.c9.io/demo/emmet.html");
AnchorPane.setLeftAnchor(webView, 0d);
AnchorPane.setTopAnchor(webView, 0d);
AnchorPane.setRightAnchor(webView, 0d);
AnchorPane.setBottomAnchor(webView, 0d);
primaryStage.setScene(new Scene(new AnchorPane(webView), 400, 300));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}