I got it to work as well early this AM. After I edited default.html again and set it to 32×32 it worked. Then I backed it down to 16×16 again and now it works. Strange, it’s almost as if the style was not being used in default.html until i edited it again.
Okay – after it worked, i added in another icon to the list in the html. Ran it again – icons don’t show up After some testing I figured out that if I edit Default HTML again and just change the size even just 2 px to 18px and run – they show up. I edit and add another icon to html – same issue. I put the px back to 18px, run – they show up. Put it back to 16px and they still show up.
If you want to do a screen share I can set one up so you can see it. Strange behavior.
It would be cool if in the HTML we could specify the fill color and when the resource is returned it can be the color specified. I like to limit the amount of free floating images on the deployment hard drive as much as possible. Maybe use the standard HTML # color tag ?
The HTML color tag doesn’t work on svg images. The fill style only works on svg elements. Wisej performs the color change on the client but it kicks in only for Wisej widgets and during the image preloading. Wisej supports a ?color=[color] parameter already, but it can only be processed by Wisej widgets since we have to way of changing the way a src attribute in img works. The color could change could be processed on the server instead of the client but it’s kind of overkill. Another way to achieve this is to use a font icon set and use the css names and unicode entitired defined by the font, see font awesome for example. This is the main reason why when working just with HTML the svg icons had to be converted to fonts.
But once i set the style in default.html – why would i have to make an edit to it for the HTML in the datagrid to work ? I should only have to set the style one time and forget it right ?
Try to clear the cache or another browser or add a parameter to Default.htm?v=1. Looks like the browser is still retrieving the first Default.html without the style.
No – what happens is – its working – then after I edit the html in the datagrid cell to add another icon and I run it it stops showing the icons. It initially does until I edit the cell HTML again. Then it stops. The only way to get it to work again is to go and make a change to default.html – then it will show the icons again in the datagrid cell. Even if i just edit they style to 18px save it , then edit it again back to 16px, save it – then run. Then the Icons show up in the datagrid cell.
Tried that by adding img role=’test’ src=’resource.wx/Wisej.Ext.ElegantIcons/arrow-up.svg’ class=’cell-image’. It’s just html, if it doesn’t work there is a problem with the browser, cache, etc. Verify using F12 with Chrome, select Elements, click the button (top left) “Select an element…” and inspect the HTML. Select the img element and you should see on the right, under Styles and Computed, the effective style. That show show exactly what’s wrong.