Skip to content
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

Styling DesThree expressions through DOM editing is not effective #24

Closed
jared-hughes opened this issue Mar 19, 2021 · 1 comment
Closed
Labels
type: bug Something isn't working
Milestone

Comments

@jared-hughes
Copy link
Owner

jared-hughes commented Mar 19, 2021

A few issues here that are related:

  1. (reported by @wompking) expressions that go out the top/bottom of the screen are removed in the DOM and do not get the custom DesThree styling (cube on the left "@3" characters removed. For example, try scrolling down on https://www.desmos.com/calculator/kwroojtkoq (especially on a shorter screen)
  2. Ctrl+A on an expression adds "@3" to the end (rather, DesThree doesn't remove the "@3" because there is no graphChanged event); purely visual. For example, try pressing ctrl+A in expression 2 of https://www.desmos.com/calculator/ghjdxovcyj
  3. Collapsed folders (Load error when expression is in collapsed folder #21). This might not be related because it affects functionality and not visuals.

Two possible fixes to consider:

  • use CSS selectors like [expr-id=24] > ... to control style. This would be convenient, but it has the downside of not updating autoOperatorNames
  • use a MutationObserver on the expressions list to observe when expressions are changed, then check if the data property expr-id falls within the set of DesThree expressions

I'm leaning toward the second because it might fix #9 too.

@jared-hughes jared-hughes added priority: normal type: bug Something isn't working labels Mar 19, 2021
@jared-hughes
Copy link
Owner Author

Issue also applies when duplicating an expression through the Desmos button. All expressions lose DesThree styling, and the "@3" appears; this persists until graph state changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant