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

Fixed quadratic easing function typos #9264

Merged
merged 3 commits into from
Dec 7, 2020

Conversation

nithinp7
Copy link
Contributor

@nithinp7 nithinp7 commented Dec 4, 2020

Deprecated and added deprecationWarning for the incorrectly spelled QUADRACTIC_IN, QUADRACTIC_OUT, and QUADRACTIC_IN_OUT in EasingFunction.js and added the correct spellings. Changed the only two internal references to the incorrect spellings (in TweenCollectionSpec.js).

This addresses the open issue: #9220. It will be resolved after the deprecation period.

Note that there were two sandcastles here and here that already use the correct spellings of the quadratic easing functions and were so far silently failing (reverting to a default easing function). After this fix, they will be using the correct intended easing functions.

Fixed typos in the quadratic easing functions and deprecated the old spellings. Corrected the only 2 internal references to the incorrect spellings.
@cesium-concierge
Copy link

Thanks for the pull request @nithinp7!

  • ✔️ Signed CLA found.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@lilleyse
Copy link
Contributor

lilleyse commented Dec 4, 2020

From offline discussion, I believe the code will need to use Object.defineProperties in order to use getters in a way that's compatible with ES5 and IE11.

Object.defineProperties(EasingFunction, {
  QUADRACTIC_IN: {
    get: function () {
      deprecationWarning(
        "QUADRACTIC_IN",
        "QUADRACTIC_IN is deprecated and will be removed in Cesium ????. Use QUADRATIC_IN instead."
      );
      return Tween.Easing.Quadratic.In;
    },
  },
  QUADRACTIC_OUT: {
    get: function() {
        ...
    }
  }
}

@nithinp7
Copy link
Contributor Author

nithinp7 commented Dec 5, 2020

Also from offline discussion, we will end the deprecation period in 3 releases, so Cesium 1.79.

@nithinp7 nithinp7 requested a review from lilleyse December 6, 2020 14:41
@lilleyse
Copy link
Contributor

lilleyse commented Dec 7, 2020

@nithinp7 excellent - documentation looks good, sandcastles still work, deprecation message gets printed correctly. Thanks as well for the detailed PR description.

Now that this is merged can you open an issue so that we remove the deprecated enums in 1.79? In that issue give some instructions for what needs to be done to remove the deprecated behavior. I think it's just removing the Object.defineProperties(EasingFunction block. See #7394 for an example. Also, make sure to assign the remove in 1.79 label to the issue (you may need to create a new label).

@lilleyse
Copy link
Contributor

lilleyse commented Dec 7, 2020

I also pushed a commit directly that moved the changes into the 1.77 section. 470b0a6

@lilleyse lilleyse merged commit bd916f1 into master Dec 7, 2020
@lilleyse lilleyse deleted the quadratic-easing-functions-typo-fix branch December 7, 2020 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants