Feature suggestion: Buttons with fixed width

21 views
Skip to first unread message

Florian Leupold

unread,
Nov 10, 2021, 3:00:03 PM11/10/21
to JSXGraph
I think it would be helpful to be able to fix the width of a JSXGraph button. This would allow to properly align buttons with different texts in them.

Best regards,
Florian

Alfred Wassermann

unread,
Nov 17, 2021, 10:50:07 AM11/17/21
to JSXGraph
Sorry, this feature did not make it into 1.4.0. But it will be addressed soon.Many thanks for the suggestion,
Alfred

Alfred Wassermann

unread,
Nov 29, 2021, 6:10:34 AM11/29/21
to JSXGraph
Would it be sufficient to set the with the cssStyle attribute? Here is an example:

const board = JXG.JSXGraph.initBoard('jxgbox', {
    boundingbox: [-5, 5, 5, -5], axis:true
});

var b1 = board.create('button', [-4, 2, 'button 1', () => {}], {cssStyle: 'width: 200px;' });

Best wishes,
Alfred


Reply all
Reply to author
Forward
0 new messages