Skip to content

Adding a size parameter to klippy(), solving #18 and #27 - #28

Open
AlexisDerumigny wants to merge 1 commit into
RLesur:masterfrom
AlexisDerumigny:master
Open

Adding a size parameter to klippy(), solving #18 and #27#28
AlexisDerumigny wants to merge 1 commit into
RLesur:masterfrom
AlexisDerumigny:master

Conversation

@AlexisDerumigny

@AlexisDerumigny AlexisDerumigny commented Oct 6, 2022

Copy link
Copy Markdown

@RLesur Thanks for this very nice package! It is very useful, but the klippy button is a bit small compared to my taste (as in #18, #27) .

This PR adds a new parameter size (in pixels) to the function klippy(), allowing the user to customize the size (by changing the width) of the button. By default, this size is set to NULL and the (existing) automatic default is used instead.

In the klippy.js file, there is a function autoSize that computes the size of the klippy icon based on the left- or right-padding of the parent. This commit adjusts automatically this padding and therefore the size of the icon, from a size parameter given by the user.

In the `klippy.js` file, there is a function `autoSize` that computes the size of the klippy icon based on the left- or right-padding of the parent.
This commit adjusts automatically this padding and therefore the size of the icon, from a `size` parameter given by the user.
@olivierchoquet

Copy link
Copy Markdown

Please integrate this PR !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants