Using JDK8b129, no shadow image is displayed when dragging an html5 draggable element regarding its position (top left corner of the parent you have a truncated image).
It was working with the jfx version embedded in the JDK8b96
A sample to reproduce :
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Region;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class WebViewSample extends Application {
private Scene scene;
MyBrowser myBrowser;
@Override
public void start(Stage stage) {
myBrowser = new MyBrowser();
scene = new Scene(myBrowser, 600, 400);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
class MyBrowser extends Region {
WebView webView = new WebView();
WebEngine webEngine = webView.getEngine();
public MyBrowser() {
webEngine.loadContent("<!doctype html><html lang='en'><head><meta charset='utf-8'><title>HTML5 drag image</title></head>"
+ "<body><img alt='move' src=\"https://www.google.com/images/icons/product/chrome-48.png\" draggable='true' title='my Image' /><p>above truncated shadow image when dragging</p>"
+ "<p>below no shadow image when dragging</p><img alt='move' src=\"https://www.google.com/images/icons/product/chrome-48.png\" draggable='true' title='myImage' /></body></html>");
getChildren().add(webView);
}
}
It was working with the jfx version embedded in the JDK8b96
A sample to reproduce :
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Region;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class WebViewSample extends Application {
private Scene scene;
MyBrowser myBrowser;
@Override
public void start(Stage stage) {
myBrowser = new MyBrowser();
scene = new Scene(myBrowser, 600, 400);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
class MyBrowser extends Region {
WebView webView = new WebView();
WebEngine webEngine = webView.getEngine();
public MyBrowser() {
webEngine.loadContent("<!doctype html><html lang='en'><head><meta charset='utf-8'><title>HTML5 drag image</title></head>"
+ "<body><img alt='move' src=\"https://www.google.com/images/icons/product/chrome-48.png\" draggable='true' title='my Image' /><p>above truncated shadow image when dragging</p>"
+ "<p>below no shadow image when dragging</p><img alt='move' src=\"https://www.google.com/images/icons/product/chrome-48.png\" draggable='true' title='myImage' /></body></html>");
getChildren().add(webView);
}
}