sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
539 stars 727 forks source link

Whole Text not appearing after collapsing silence block. #3864

Open Ashish020202 opened 2 months ago

Ashish020202 commented 2 months ago

Description

Text is not appearing properly after collapsing. The shape bounding box doesn't seem to update properly.

Expected Behavior

It must show the whole text after collapsing.

Screenshots

image

image

How to Reproduce

Drag a silent note (rest) off of the Note Values palette and collapse it.

Thank you for contributing to our project! We appreciate your help in improving it.

πŸ“š See contributing instructions.

πŸ™‹πŸΎπŸ™‹πŸΌ Questions: Community Matrix Server.

pikurasa commented 2 months ago

Yes, I've seen this often.

@walterbender @meganindya any ideas what the root cause might be?

Ashish020202 commented 2 months ago

@walterbender where I can find the calculation for the shape of bounding box .

walterbender commented 2 months ago

The bounding box is handled in block.js

Ashish020202 commented 2 months ago

@walterbender sir, I think the calculation for the bounding box is inside blockfactory . can you confirm once?

walterbender commented 2 months ago

Yes in that the block factory should be calculating the _width, which is returned by getwidth(), which in turn is returned by the block generator in protoblock.js, which is called by block.js. In block.js, the container bounds are defined.

So problem could be anywhere along that chain of calls.