01-24-2016, 08:57 AM | #1 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
Plugin changes to images not reflected until Sigil restart
I have something similar like this in addition. If i use my AdustSVG plugin und the dimensions needs to be changed the file isnt displayed properly. Restarting Sigil and everything is fine. This i can reprduce it happens in each and every book im treating like this on Sigil 092 Win7 64.
Example: Call Plugin AdjustSVG in codeview After values have been corrected switch to bookview => Picture is too big and not centered nor dies it fit in the canvas Last edited by rubeus; 01-24-2016 at 09:03 AM. |
01-24-2016, 09:04 AM | #2 | |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Last edited by DiapDealer; 01-24-2016 at 10:26 AM. |
|
Advert | |
|
01-24-2016, 09:19 AM | #3 | |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
If it's the latter, both Book View and and Preview immediately reflect the dimension-changes I make (in Code View) to the svg wrapper (on both Windows 7 and Linux). Last edited by DiapDealer; 01-24-2016 at 10:26 AM. |
|
01-24-2016, 09:29 AM | #4 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
The example file contains an svg wrapped image with false dimension. Display in bookview is ok. After correcting it with my plugin in codeview and then switch to bookview its not displayed as it should.
|
01-24-2016, 09:36 AM | #5 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
How do you "correct it" with your plugin? I only see the ability to create new xhtml files from images.
|
Advert | |
|
01-24-2016, 09:37 AM | #6 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
I'm using AdjustSVG, not AddimgasSVG
|
01-24-2016, 09:44 AM | #7 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
01-24-2016, 09:50 AM | #8 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Ok. So I still can't experience the problem. When running the AdjustSVG plugin on Windows Vista/Windows 7, the change in dimensions is immediately reflected in Book View/Preview.
Last edited by DiapDealer; 01-24-2016 at 10:27 AM. |
01-24-2016, 10:12 AM | #9 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
I was afraid of that that it works on your installation
|
01-24-2016, 10:23 AM | #10 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Actually, no wait. I seem to be experiencing the same thing you are (from your thumbnails). I just assumed you meant that changing the dimensions didn't change the image at all. It seems to take a Sigil restart for the 100% width/height settings kick in.
Manually making the same dimension-changes in Code View does properly update the Book View/Preview display, however, so I can confirm that something funky is going on here. I am going to split this out into its own conversation, though. Last edited by DiapDealer; 01-24-2016 at 10:39 AM. |
01-24-2016, 10:57 AM | #11 |
Sigil Developer
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Webkit (BV/PV) will not reload resources unless we invalidate the cache. We do that when resources are added or deleted atomatically in the plugin runner code. But xhtml should always be updated in PV BV when modified by the plugin. Exactly what is the plugin changing? Is it code in an xhtml file or code in a standalone svg image resource?
|
01-24-2016, 11:01 AM | #12 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It's changing the code in an xhtml file. Specifically, the dimension/viewport attributes of an svg-wrapped jpeg image.
Steps: Install the AdjustSVG plugin/download z.epub Open z.epub Run AdjustSVG plugin See the image exceed the canvas in Book View/Preview You can switch tabs between Code View/Book View or close/reopen the html resource tab, but it won't fill the canvas like it's supposed to until you either save and restart Sigil, or you save and close the html resource tab and reopen it (you'll probably have to open the image resource tab to be able to close the html resource one). The Mend Preference settings make no difference. Last edited by DiapDealer; 01-24-2016 at 11:17 AM. |
01-24-2016, 01:01 PM | #13 |
Sigil Developer
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Hi,
I can recreate this but, I have triple checked and we are properly clearing the memory caches which should force both PV and BV to reload its resources. I have also tried sending the FlowTab a signal directly to reload BV after clearing the caches but still nothing changes. This is going to be another of those bugs. This should be properly done. Not sure why it isn't. |
01-24-2016, 01:43 PM | #14 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I've found that running Mend Code will make it appear correctly, too (one may have to switch from Book View to Code View and back, but Preview updates immediately after running Mend).
Which all leads me to believe that even though there's nothing technically wrong with the xtml file the AdjustSVG plugin is producing/modifying, that there's something there that WebKit just doesn't like. In Code View--with Preview Open--After you run the AdjustSVG plugin you can right-click and do Reformat HTML->Mend Code and you can then right-click and "Undo" and "Redo." In this way, you can toggle the image from correct to wrong, while watching the code change in Code View. It's very subtle, but Mend seems to be "fixing" things in the xml declaration and the DOCTYPE only. Ahhh! It's actually the preserveAspectRatio attribute. Something is lower-casing that entire attribute name. Since I don't see that being set in the plugin, it almost has to be in either sigil_bs4.serialize_xhtml() or something else after. |
01-24-2016, 02:11 PM | #15 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
Yes i'm using the bs4 and i'm not modifying the attributes directly, only their values. Then serializing and writing back...
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
epubcheck plugin for Sigil | Doitsu | Plugins | 502 | 02-20-2024 06:58 AM |
[Plugin] ePub3-itizer - epub3 output plugin for Sigil | KevinH | Plugins | 435 | 01-19-2023 09:46 PM |
icarus Sigil plugin | AlPe | Plugins | 26 | 12-05-2017 10:03 AM |
smoothRemove_v010 plugin for Sigil | kbanelas | Plugins | 15 | 01-27-2017 05:51 PM |
How do I change Plugin Images/Icons? | Steppa | Plugins | 8 | 01-22-2013 06:37 PM |