New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for float numbers in the z-index style property #3160
Comments
Great. Is there anything else for the use case in the app? The library has more properties that affect the draw order, and they may need to be accounted for in conversions even if not in the UI.
Are we certain that solely this int=>double change is sufficient for this use case in the app?
… On Sep 11, 2023, at 13:05, Dylan Fong ***@***.***> wrote:
Description of new feature
What should the new feature do? For visual features, include an image/mockup of the expected output.
Allow users to specify float numbers for the z-index style property.
Motivation for new feature
Describe your use case for this new feature.
Currently, Cytoscape.js allows only integers for the z-index style property. However, in Cytoscape Desktop, there are instances where users would like to specify values like 1.0 or 1.2 including negative numbers like -1.0 or -10. This change would allow us to avoid another transformation layer when importing networks from Cytoscape Web from Cytoscape Desktop and vice versa.
The downside I can see is that change would make z-index behave slightly different than the css z-index property. Integers will still be supported, but users may find it foreign to allow a z-index be a float number.
For reviewers
Reviewers should ensure that the following tasks are carried out for incorporated issues:
Ensure that the reporter has adequately described their idea. If not, elicit more information about the use case. You should iteratively build a spec together.
Ensure that the issue is a good fit for the core library. Some things are best done in extensions (e.g. UI-related features that aren't style-related). Some things are best done by app authors themselves -- instead of in Cytoscape libraries.
The issue has been associated with a corresponding milestone <https://github.com/cytoscape/cytoscape.js/milestones>.
The commits have been incorporated into the unstable branch via pull request. The corresponding pull request is cross-referenced.
—
Reply to this email directly, view it on GitHub <#3160>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHRO47W4UXH4JNDUYUUVETXZ5AFBANCNFSM6AAAAAA4TUOOLA>.
You are receiving this because you are subscribed to this thread.
|
Let me verify with the rest of the UCSD team. |
I can confirm that this is the only change the UCSD team needs. |
I'm going to postpone the 3.27.0 release a bit so we can get this feature in for Cyweb ASAP. I'll aim for a Wed/Thu release. |
- Revise `z-index` property to use a `nonNegativeNumber` type rather than `nonNegativeInt`. - Revise documentation accordingly.
This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions. |
@d2fong, let me know if this is suitable for release. |
They still want support for negative float values. Is there a large cost to this change? If so this should be ok for now. |
Great, I’ll adjust this tomorrow then. It should be a straightforward change. |
Ref: Add support for float numbers in the z-index style property #3160
Re-opening, as I see now that I should add a note regarding negative values and how they don't work like traditional CSS, by putting things behind the current layer. |
Ref: Add support for float numbers in the z-index style property #3160
Description of new feature
What should the new feature do? For visual features, include an image/mockup of the expected output.
Allow users to specify float numbers for the
z-index
style property.Motivation for new feature
Describe your use case for this new feature.
Currently, Cytoscape.js allows only integers for the
z-index
style property. However, in Cytoscape Desktop, there are instances where users would like to specify values like1.0
or1.2
including negative numbers like-1.0
or-10
. This change would allow us to avoid another transformation layer when importing networks from Cytoscape Web from Cytoscape Desktop and vice versa.The downside I can see is that change would make z-index behave slightly different than the css z-index property. Integers will still be supported, but users may find it foreign to allow a z-index be a float number.
For reviewers
Reviewers should ensure that the following tasks are carried out for incorporated issues:
unstable
branch via pull request. The corresponding pull request is cross-referenced.The text was updated successfully, but these errors were encountered: