From ce884d95b6cf6cf9d33fc2cd0892f5877d89c85d Mon Sep 17 00:00:00 2001 From: Dwayne Jones Date: Fri, 2 Jun 2017 18:09:33 -0400 Subject: [PATCH 1/3] Fixed Grid reset --- src/Hypergrid.js | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/Hypergrid.js b/src/Hypergrid.js index 8e6635508..26a079fb6 100644 --- a/src/Hypergrid.js +++ b/src/Hypergrid.js @@ -286,25 +286,6 @@ var Hypergrid = Base.extend('Hypergrid', { clearState: function() { this._theme = Object.create(defaults); - /** - * @summary The theme layer in the properties hierarchy. - * @desc The theme layer is the second layer, above the `defaults` layer, and below the `properties` layer. - * Attempting to reset the theme throws an error (to guard against confusion with the `properties.theme` setter). - * @name theme - * @type {object} - * @summary The prototype layer where theme look and feel properties can be defined. - * @type {object} - * @memberOf Hypergrid# - */ - Object.defineProperty(this, 'theme', { - get: function() { - return this._theme; - }, - set: function(theme) { - throw new this.HypergridError('Cannot reset grid.theme (properties layer). Use grid.applyTheme or the grid.properties.theme setter to apply a new theme.'); - } - }); - /** * @name properties * @type {object} @@ -2229,6 +2210,23 @@ var Hypergrid = Base.extend('Hypergrid', { : themeName in Hypergrid.themes ? themeName // registered theme name : theme; // unregistered theme object + }, + + /** + * @summary The theme layer in the properties hierarchy. + * @desc The theme layer is the second layer, above the `defaults` layer, and below the `properties` layer. + * Attempting to reset the theme throws an error (to guard against confusion with the `properties.theme` setter). + * @name theme + * @type {object} + * @summary The prototype layer where theme look and feel properties can be defined. + * @type {object} + * @memberOf Hypergrid# + */ + get theme() { + return this._theme; + }, + set theme(theme) { + console.warn('Attempt to reset grid.theme (properties layer). Use grid.applyTheme or the grid.properties.theme setter to apply a new theme.'); } }); From aef8c9d62b8b2fcc0bcfae145f1fe93b3ead4a35 Mon Sep 17 00:00:00 2001 From: Dwayne Jones Date: Sun, 4 Jun 2017 18:42:35 -0400 Subject: [PATCH 2/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 072e1b950..03abe7b4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fin-hypergrid", - "version": "2.0.1", + "version": "2.0.2", "description": "Canvas-based high-performance spreadsheet", "repository": { "type": "git", From 3aa8404e67cd09fac9f0ec3e148cb68e21b7ca55 Mon Sep 17 00:00:00 2001 From: Dwayne Jones Date: Sun, 4 Jun 2017 18:44:58 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad7f20b2a..f60eaf030 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Below is an example custom application built ontop of the Hypergrid API tooling. * [Roadmap](https://github.com/openfin/fin-hypergrid/blob/master/README.md#roadmap) * [Contributing](https://github.com/openfin/fin-hypergrid/blob/master/README.md#contributors) -### Current Release (2.0.0 - 16 May 2017) +### Current Release (2.0.2 - 4 June 2017) 2.0 reflects a substantial simplification of the core functionality of the grid to just customized rendering. The rendering engine does allow support for showing sorting, filtering, grouping, etc. but specific logic on how a user may want to do that is not apart for this project. Demos will be made available on the [wiki](https://github.com/openfin/fin-hypergrid/wiki) for this.