Draggable method onMouseMove problem wrong detection SVG
Draggable method onMouseMove has comment
Code:
// elem.getClassName throwing GWT exception when dragged widget is over // SVG / VML
I use third party JS library leaflet, drawing polyline with svg. Exception raised when over polyline.
GXT version 3.0.1
Workaround or fix
change in Draggable condition error and add try catch
Code:
// elem.getClassName throwing GWT exception when dragged widget is over
// SVG / VML
if (hasAttribute(elem, "class")) {
String cls = ((Element) event.getEventTarget().cast()).getClassName();
if (cls != null && cls.contains("x-insert")) {
return;
}
}
to
Code:
// elem.getClassName throwing GWT exception when dragged widget is over
// SVG / VML
if (hasAttribute(elem, "class")) {
try {
final String cls = ((Element) event.getEventTarget().cast()).getClassName();
if (cls != null && cls.contains("x-insert")) {
return;
}
} catch (final Exception e) {
}
}