Hi Isomorphic,
using 12.1d_2018-08-24, click handler for "*.svg" images is not working.
Here is my test case
I'm also using css rule for first image, and it works good!
Best regards
Pavo
using 12.1d_2018-08-24, click handler for "*.svg" images is not working.
Here is my test case
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.Version; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.util.Page; import com.smartgwt.client.util.PageKeyHandler; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Img; import com.smartgwt.client.widgets.Window; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS extends VLayout implements EntryPoint { private IButton recreateBtn; public void onModuleLoad() { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); setWidth100(); setHeight100(); recreateBtn = new IButton("Recreate"); recreateBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { new MyWindow().show(); } }); addMember(recreateBtn); new MyWindow().show(); draw(); } private class MyWindow extends Window { public MyWindow() { setWidth(400); setHeight(300); setMembersMargin(0); setModalMaskOpacity(70); setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")"); SC.logWarn(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")"); setShowMinimizeButton(false); setIsModal(true); setShowModalMask(true); centerInPage(); VLayout vL = new VLayout(); Img svgImg = new Img("http://127.0.0.1:8888/builtinds/tools/images/kiwi.svg", 100, 100); svgImg.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { SC.logWarn("SVG clicked"); } }); Img svgImg2 = new Img("http://127.0.0.1:8888/builtinds/tools/images/submenu.svg", 100, 100); svgImg2.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { SC.logWarn("SVG clicked"); } }); Img pngImg = new Img("http://127.0.0.1:8888/builtinds/tools/images/database_gear.png", 100, 100); pngImg.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { SC.logWarn("PNG clicked"); } }); vL.addMembers(svgImg, svgImg2, pngImg); addItem(vL); } } }
Code:
svg:hover > path {fill: yellow !important;}
Pavo
Comment