Skip to content

Commit

Permalink
Deprecate getSafeValue
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Feb 1, 2021
1 parent 874c994 commit cc0b28e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h1 class="brand">Grapick</h1>
gp.addHandler(1, '#085078', 1);
gp.addHandler(99, '#85D8CE', 1, { keepSelect: 1 });
gp.on('change', function(complete) {
document.body.style.backgroundImage = gp.getSafeValue();
document.body.style.backgroundImage = gp.getValue();
})
gp.emit('change');

Expand Down
4 changes: 3 additions & 1 deletion src/Grapick.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ export default class Grapick extends EventEmitter {


/**
* Get the gradient value with the browser prefix if necessary
* Get the gradient value with the browser prefix if necessary.
* The usage of this method is deprecated (noticed weird behaviors in modern browsers).
* @return {string}
* @deprecated
*/
getSafeValue(type, angle) {
const previewEl = this.previewEl;
Expand Down

0 comments on commit cc0b28e

Please sign in to comment.