ghbore/flowchartjs

Applying styles

Closed this issue · 7 comments

The plugin is awesome and much appreciated, and does produce the flowchart.
But I can't get the styles from the JSON files to be applied.
I've checked and it is valid json in the .\lib\plugins\flowchartjs\styles folder with, what appear to be, the correct permmissions.
I copied the default and uploaded it as other and it does show in the page editor Fs/c button.
Using the sample below I would expect the nodes to be colour coded, but they are just white.
Changing any of the other.json global entries, e.g. "font-color", has no effect.
<flowchartjs other>
st=>start: Start|past:>http://www.google.com[blank]
e=>end: End|future:>http://www.google.com
op1=>operation: My Operation|past
op2=>operation: Stuff|current
sub1=>subroutine: My Subroutine|invalid
cond=>condition: Yes
or No?|approved:>http://www.google.com
c2=>condition: Good idea|rejected
io=>inputoutput: catch something...|future
st->op1(right)->cond
cond(yes, right)->c2
cond(no)->sub1(left)->op1
c2(yes)->io->e
c2(no)->op2->e

cond@>sub1({"stroke":"Red","stroke-width":2,"arrow-end":"classic-wide-long"})
c2@>op2({"stroke":"Red","stroke-width":2,"arrow-end":"classic-wide-long"})
cond@>c2({"stroke":"Green","stroke-width":2,"arrow-end":"classic-wide-long"})
c2@>io({"stroke":"Green","stroke-width":2,"arrow-end":"classic-wide-long"})
</flowchartjs>
opera_2018-11-08_16-34-06

I'm glad this plugin is helpful.

What's your environment? I just follow your steps, and find it works as expected, and any change in other.json has effect.

Windows Server 2012R2 + IIS
Dokuwiki 2018-04-22a "Greebo"
Client: Opera, Chrome,
IE 11 and Firefox

Given the script below I would expect the START element to be green with red text

st=>start: Start
e=>end: End
st(right)->e

other.json.txt

Dear @vakogtx,

I have setup dokuwiki at a (7 days) free trial cloud server, following your settings (Windows Server 2012 R2, IIS 8, PHP 7.2.12, Dokuwiki 2018-04-22a, IE 11 & Firefox). Unfortunately I still can not reproduce the bug you met :(

You can access it by http://114.115.252.52/doku.php?id=playground:playground, with admin/1qazse4. If you need access to cloud server, please email me.

Hope it's useful!

Thanks for this appreciate it.
It worked when I opened it initially.
Then I went into Admin to look at the FlowchartFS plugin... entry and after that it doesn't even correctly recognise the flowchartjs tags !
I tried reinstalling the plugin to no avail.
Also the default template is not being used.

Now it's displaying the flowchart correctly on your test site.
As far as I can tell in the browser it is loading the json file according to the Opera plugin that shows all the JS being loaded.
So it would seem that the style is not being applied.

@vakogtx Could you see any JavaScript error from 'web console' (Ctrl+Shift+K) in firefox, if some bugs prevent json style to be applied?

I also have encountered the improper loading of pages, until I blocked/removed caches from this site.

I don't see any warnings/errors.
firefox_2018-11-26_10-07-17