Code Monkey home page Code Monkey logo

Comments (3)

parente avatar parente commented on July 20, 2024

@dalogsdon says:

We could just look at each direct-child of the output_area and widget-area in the cells, and see if they implement notifyResize(). This would cut down on the number of elements we'd have to search for.

from dashboards.

lbustelo avatar lbustelo commented on July 20, 2024

Searching is probably not a viable solution.
In looking at the iron-resizable-behavior code, the best thing would be to attach a listener for 'iron-request-resize-notification' to each output area or other higher up element. That is the way that resizable elements let the world know about them. Then keep a running list.

An easier approach would be to have control of the created Dom and insert resizable aware elements, but this would mean a deeper tie into polymer.

Gino B.

On Sep 28, 2015, at 10:34 PM, Peter Parente [email protected] wrote:

@dalogsdon says:

We could just look at each direct-child of the output_area and widget-area in the cells, and see if they implement notifyResize(). This would cut down on the number of elements we'd have to search for.


Reply to this email directly or view it on GitHub.

from dashboards.

jhpedemonte avatar jhpedemonte commented on July 20, 2024

Attached a pull request which updates the Dashboard code based on Gino's comment above. We tested with the following notebook: https://gist.github.com/jhpedemonte/d07b269b3f9b6dc8f8b3. Switching between Notebook and Dashboard views should notify the element to resize, as well as resizing the window or the cell (when in dashboard view).

In order to work with this code, Polymer elements will need to mixin iron-resizable-behavior and listen for the iron-resize event.

A note on sizing relative to the notebook/dashboard cell:
A dashboard cell has an exact width and height specified by the user. However, because a notebook cell's height is determined by its children's height (widget-area and output_area), an element cannot set its height relative to the notebook cell.

from dashboards.

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.