weixin_39715187 2020-11-29 23:41
浏览 0

Showing values associated with a block

We need some way to draw values associated with a block. I believe these can be any string, and we don't need to support general HTML at this time (e.g. the way Snap does) - so we might want to draw it in the SVG rather than in an overlay (not sure though - might be easier with an overlay..)

screen shot 2016-04-20 at 11 24 05 am

The bubble should wrap long values to a fixed width, and be able to display on the left as well as the right of the block.

I think this might be nice for vertical as well as horizontal eventually (if we add reporters to horizontal, for example).

该提问来源于开源项目:LLK/scratch-blocks

  • 写回答

2条回答 默认 最新

  • weixin_39715187 2020-11-29 23:41
    关注

    That's interesting, thanks for sharing!

    This does seem like an unfortunate edge case. A scrollable view or having it track to the block both seem like nice ideas. However I'm worried they might conflict with the fact that the bubble hides after some time (and after you move your mouse cursor away from the block) so it may actually be hard to get the behavior to be right. Maybe we could consider some mechanism for when values get extra long - e.g., if it's so big that it would be cut off the page, display the value in a scrollable pop-up modal dialog. Not sure what we want to do here, but it's good to keep it in mind.

    评论

报告相同问题?