Git Product home page Git Product logo

Comments (3)

samelhusseini avatar samelhusseini commented on May 6, 2024

I think I've seen something like this in App Inventor. @ewpatton?

from blockly-samples.

ewpatton avatar ewpatton commented on May 6, 2024

We don't have this feature specifically, but we have two that are very similar and would in combination be something akin to this.

  1. We've had FieldFlydown as a custom field since 2014. This is used for both global and lexically scoped variables to retrieve getter/setter blocks for variables. It's accomplished by creating a new group on the <svg> element and creating a flyout that draws to that group. The flyout only ever contains the set/get blocks.

image

  1. I've been working on a new documentation system that allows us to attach help items to menus, which when clicked show an iframe with additional content explaining the feature. One can then drag blocks out of this iframe into the main workspace. I demoed this at the summit, but it's not in production yet. This uses the code-in-PNG feature that I also demoed at the summit (and is in production). In theory, this can use any block but isn't as clean because dragging across the iframe boundary is implemented with images rather than svg, and the browser typically shows a translucent copy of the image so it doesn't feel as real as dragging a block.

If I were to attempt an implementation of this, I would probably embed an <svg> directly into the menu item and have a drag start handler reposition it in the workspace's <svg> from the menu at the same x, y coordinates using transforms. This way everything lives in the same DOM space (as in option 1) but benefits from embedding the content in the menus (option 2).

from blockly-samples.

moniika avatar moniika commented on May 6, 2024

Transferring to Blockly Samples as this would make a really nice plugin.

from blockly-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.