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

refactor: only run license checker when needed #125

Merged
merged 2 commits into from
Nov 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 12 additions & 13 deletions src/vaadin-board.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,26 @@
return '2.1.0';
}

constructor() {
super();
}
/**
* @protected
*/
static _finalizeClass() {
super._finalizeClass();

connectedCallback() {
super.connectedCallback();
const devModeCallback = window.Vaadin.developmentModeCallback;
const licenseChecker = devModeCallback && devModeCallback['vaadin-license-checker'];
if (typeof licenseChecker === 'function') {
licenseChecker(BoardElement);
}
}

/**
* Redraws the board and all rows inside it, if necessary.
*
* In most cases, board will redraw itself if your reconfigure it. If you dynamically change CSS
* which affects this element, then you need to call this method.
**/
redraw() {
*/
redraw() {
this.notifyResize();
}

Expand All @@ -79,12 +84,6 @@
* @namespace Vaadin
*/
window.Vaadin.BoardElement = BoardElement;

const licenseChecker = window.Vaadin.developmentModeCallback
&& window.Vaadin.developmentModeCallback['vaadin-license-checker'];
if (typeof licenseChecker === 'function') {
licenseChecker(BoardElement);
}
})();
</script>
</dom-module>