fix(ivy): ensure falsy styling is not applied during creation mode (#26793)

PR Close #26793
This commit is contained in:
Matias Niemelä
2018-10-26 16:32:18 -07:00
parent 332394d87c
commit 68b2211e64
6 changed files with 235 additions and 88 deletions

View File

@ -21,8 +21,8 @@ export interface Player {
export const enum BindingType {
Unset = 0,
Class = 2,
Style = 3,
Class = 1,
Style = 2,
}
export interface BindingStore { setValue(prop: string, value: any): void; }
@ -35,7 +35,7 @@ export interface BindingStore { setValue(prop: string, value: any): void; }
* to be used with `PlayerFactory`.
*/
export interface PlayerFactoryBuildFn {
(element: HTMLElement, type: BindingType, values: {[key: string]: any},
(element: HTMLElement, type: BindingType, values: {[key: string]: any}, isFirstRender: boolean,
currentPlayer: Player|null): Player|null;
}
@ -53,7 +53,7 @@ export interface PlayerFactoryBuildFn {
export interface PlayerFactory { '__brand__': 'Brand for PlayerFactory that nothing will match'; }
export interface PlayerBuilder extends BindingStore {
buildPlayer(currentPlayer: Player|null): Player|undefined|null;
buildPlayer(currentPlayer: Player|null, isFirstRender: boolean): Player|undefined|null;
}
/**

View File

@ -196,7 +196,7 @@ export const enum StylingFlags {
// The max amount of bits used to represent these configuration values
BitCountSize = 5,
// There are only five bits here
BitMask = 0b1111
BitMask = 0b11111
}
/** Used as numeric pointer values to determine what cells to update in the `StylingContext` */