Add reset() method to CSSNode #140

Merged
lucasr merged 1 commits from fast-reset into master 2015-10-08 07:06:49 -07:00
lucasr commented 2015-10-05 08:59:25 -07:00 (Migrated from github.com)

This allows users of css-layout in Java to perform faster resets on
CSSNode in cases when you want to recycle instances.

CSSLayout.resetResult() was renamed to simply reset() for consistency.

This allows users of css-layout in Java to perform faster resets on CSSNode in cases when you want to recycle instances. CSSLayout.resetResult() was renamed to simply reset() for consistency.
lucasr commented 2015-10-08 05:16:49 -07:00 (Migrated from github.com)

@kmagiera @foghina ping?

@kmagiera @foghina ping?
foghina commented 2015-10-08 05:29:06 -07:00 (Migrated from github.com)

See my inlines, otherwise

looks good to me

Not a big fan of the breaking API change, but as long as you fix usages, I'll allow it.

See my inlines, otherwise ![looks good to me](https://cloud.githubusercontent.com/assets/412054/10366160/71bdbd4e-6dc0-11e5-8ea0-002df7683087.png) Not a big fan of the breaking API change, but as long as you fix usages, I'll allow it.
lucasr commented 2015-10-08 06:19:58 -07:00 (Migrated from github.com)

@foghina What API break?

@foghina What API break?
foghina commented 2015-10-08 06:33:48 -07:00 (Migrated from github.com)

What API break?

resetResult() -> reset().

> What API break? `resetResult()` -> `reset()`.
lucasr commented 2015-10-08 06:44:42 -07:00 (Migrated from github.com)

@foghina Ah, I thought CSSLayout was package-private. Reverted this change to avoid the API break.

@foghina Ah, I thought CSSLayout was package-private. Reverted this change to avoid the API break.
lucasr commented 2015-10-08 06:51:28 -07:00 (Migrated from github.com)

Updated the branch:

  • Reverted resetLayout() rename to avoid API break
  • Don't reset measure function on reset to avoid problems in RN
  • Attachment check before resetting in CSSNode as suggested
Updated the branch: - Reverted resetLayout() rename to avoid API break - Don't reset measure function on reset to avoid problems in RN - Attachment check before resetting in CSSNode as suggested
Sign in to join this conversation.
No description provided.