Style updates are registered as Data updates #485

Open
jonbgallant opened this Issue Oct 11, 2016 · 0 comments

Projects

None yet

1 participant

@jonbgallant
Contributor

I need a way to detect when only Style changes are made.

Add the following code to any visual with style attributes.

private logUpdateType(options: VisualUpdateOptions): void {
console.log("Data: " + (options.type & VisualUpdateType.Data));
console.log("Resize: " + (options.type & VisualUpdateType.Resize));
console.log("ResizeEnd: " + (options.type & VisualUpdateType.ResizeEnd));
console.log("Style: " + (options.type & VisualUpdateType.Style));
console.log("ViewMode: " + (options.type & VisualUpdateType.ViewMode));
console.log("All: " + (options.type & VisualUpdateType.All));
}

public update(options: VisualUpdateOptions) {
this.logUpdateType(options);
}

When you change any setting in the format pane it is registered as a Data change, not a Style change.
Data: 2
Resize: 0
ResizeEnd: 0
Style: 0
ViewMode: 0
All: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment