Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wide extension - padding is off when checkbox option is changed #782

Closed
hafasek opened this issue Oct 18, 2017 · 3 comments
Closed

wide extension - padding is off when checkbox option is changed #782

hafasek opened this issue Oct 18, 2017 · 3 comments

Comments

@hafasek
Copy link

hafasek commented Oct 18, 2017

When changing the fancytree checkbox option, via some event- such us click of the button, the padding is not set right.
I have created a jsfiddle to ilustrate the problem.
https://jsfiddle.net/hafasek/9038m2c8/

Any help would be highly appreciated.

@hafasek hafasek changed the title wide extension - padding is off when checkboxes option are changed wide extension - padding is off when checkbox option is changed Oct 18, 2017
@mar10
Copy link
Owner

mar10 commented Oct 20, 2017

ext-wide creates CSS rules in the html header on the fly, taking into account the value of the checkbox: false option.

This is currently done in the treeCreate phase.

A possible solution would be to pull this code into an exported method, so it can be called by developers.
It could then also be called automatically after the checkbox option was modified.

@hafasek
Copy link
Author

hafasek commented Oct 20, 2017

Thank you for a quick reply. I understand your suggestion, but literally have no clue of how to proceed with it. Javascript is not my language of choice.

In treeCreate I found this section, which I believe is to be in the exported method
this._local.lineOfs = (1 + (ctx.options.checkbox ? 1 : 0) + (ctx.options.icon === false ? 0 : 1)) * (iconWidth + iconSpacing) + iconSpacing;
Would you be able to direct me to some other extension where some external method is available (and also how to call it afterwards) or just show me some example ideally in jsfiddle?

Many thanks!

@mar10
Copy link
Owner

mar10 commented Oct 20, 2017

Ah sorry, the comment was not directed at you specifically, but just an analysis how to fix it (I classified this as bug). It will probably be fixed in the next release.

@mar10 mar10 closed this as completed in 796f962 Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants