Comments (12)
Would it make sense to change all the overlay functions to return a promise? This would allow you to write await functions for all the overlay methods.
from sigplot.
from sigplot.
@mrecachinas @desean1625 @sterre great news...I actually got this implemented last night. If users were treating the return value from overlay_bluefile
and friends as an opaque value then there are no API breaks. If someone was ignoring the return value and hardcoding layer numbers into their push
or reload
calls then they will need to change their code. I'll submit a PR soon...but you can check out:
spectriclabs@3167fef
spectriclabs@52e8178
spectriclabs@a7d94bd
from sigplot.
Here is a PR #89
from sigplot.
After discussing this with @maihde, it appears this is intentional because of the asynchronous nature of file-loading.
For the time being, this issue can be solved by modifying the docs.
The longer term solution might include returning the layer index of where the layer will be once the file is loaded.
from sigplot.
Would it be helpful for overlay_href
to take an optional callback argument, triggered when the layer is added sometime in the future? Or maybe SigPlot could trigger some other event when a layer resolves?
from sigplot.
overlay_href
does take in an optional callback triggered when the layer is added and you have access to the layer index within the callback.
from sigplot.
overlay_href
does take in an optional callback triggered when the layer is added and you have access to the layer index within the callback.
Then clearly it was a really good idea and all of us who thought of it independently are Quality People. I do like the idea of being able to record immediately where the layer will be, for future access; but given that you won't know the layer is really there until after the callback fires, I don't see any reason to hurry.
from sigplot.
@sterre right -- and that's fair. This came up with bookkeeping within react-sigplot for the HrefLayer. I believe I've found a way around it (using the callback), but it is an open question.
from sigplot.
@desean1625 This would definitely be an API breaking change, but I agree it makes a lot of sense. For this big of a change, definitely going to want @maihde to weigh in.
from sigplot.
Given 45778ab, where multiple hrefs can now be plotted with overlay_href
, should we return a list of promises (i.e., one promise per layer)? A promise where a parameter is a list of layers?
from sigplot.
Fixed in #89.
from sigplot.
Related Issues (20)
- When in L1 or L2 mode, allow ymin and ymax to be specified in log scale. HOT 1
- How do I set the z axis min and max using the options that are passed into sigplot HOT 1
- X cut doesn't match what's on screen HOT 4
- How can I put text next to an accordion vertical line? HOT 2
- Different Z-axis range handled in Y-axis than X-axis for raster plot HOT 2
- Display currently "selected" intensity value with raster plots HOT 6
- Plotting array layer of data with varied xdelta values HOT 14
- How to alter the axis labels (tick mark labels) to be full value rather than decimal version HOT 4
- Falling raster while zoomed in falls off the screen HOT 1
- unable to plot FFT HOT 9
- Plotting SP needs to be optimized. HOT 2
- Investigate implementing RDP
- m.initialize has a bug setting the subsize if the array input is array of data views HOT 2
- Exception when using downscale max and setting xdelta/start separately HOT 4
- Surface Plots HOT 2
- Plotting more than 32768 points HOT 1
- can we make the accordion vertical bars thicker? HOT 3
- how to plot only one element of a type 2000 HOT 2
- Accordion onmouseup change events guaranteed to not fire HOT 4
- Convert Layer1D to Layer2D and back HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sigplot.