Skip to content

Commit

Permalink
kill originalSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller committed Jun 16, 2020
1 parent 007c274 commit 651ce7c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 16 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
Changelog
===

# 3.0.0

> Not yet on npm
A number of neat features including support for server-side rendering, the new `raise` helper for better SVG helpers, aspect ratios, viewbox options, allowing a cake to be `position: absolute;`, use the term `config` instead of `originalSettings`
* [cb35d277aef34a32d8f811c563b9c62f9366c86a](https://github.com/mhkeller/layercake/commit/cb35d277aef34a32d8f811c563b9c62f9366c86a)

#### Breaking changes

Rename WebGL component's `contextOptions` prop to `contextAttributes` to reflect the WebGL documentation.
* [007c2747a2caed77f3046f1dd7cbae2e850b3992](https://github.com/mhkeller/layercake/commit/007c2747a2caed77f3046f1dd7cbae2e850b3992)

Access the `ctx` object off of the Canvas component as `const ctx = getContext('canvas')` instead of `const ctx = getContext('ctx')`, which was a little confusing.
* [0b0198575a5758bfce9cbd37c22f3b8509c5d96f](https://github.com/mhkeller/layercake/commit/0b0198575a5758bfce9cbd37c22f3b8509c5d96f)


# 2.0.1

> 2020-01-26
Expand Down
31 changes: 15 additions & 16 deletions src/LayerCake.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@
* Add the active keys since those aren't on our settings object.
* This is mostly an escape-hatch
*/
const originalSettings = {};
$: if (x) originalSettings.x = x;
$: if (y) originalSettings.y = y;
$: if (z) originalSettings.z = z;
$: if (r) originalSettings.r = r;
$: if (xDomain) originalSettings.xDomain = xDomain;
$: if (yDomain) originalSettings.yDomain = yDomain;
$: if (zDomain) originalSettings.zDomain = zDomain;
$: if (rDomain) originalSettings.rDomain = rDomain;
$: if (xRange) originalSettings.xRange = xRange;
$: if (yRange) originalSettings.yRange = yRange;
$: if (zRange) originalSettings.zRange = zRange;
$: if (rRange) originalSettings.rRange = rRange;
const config = {};
$: if (x) config.x = x;
$: if (y) config.y = y;
$: if (z) config.z = z;
$: if (r) config.r = r;
$: if (xDomain) config.xDomain = xDomain;
$: if (yDomain) config.yDomain = yDomain;
$: if (zDomain) config.zDomain = zDomain;
$: if (rDomain) config.rDomain = rDomain;
$: if (xRange) config.xRange = xRange;
$: if (yRange) config.yRange = yRange;
$: if (zRange) config.zRange = zRange;
$: if (rRange) config.rRange = rRange;
/* --------------------------------------------
* Make store versions of each parameter
Expand Down Expand Up @@ -120,7 +120,7 @@
const _rRange = writable();
const _padding = writable();
const _flatData = writable();
const _originalSettings = writable(originalSettings);
const _config = writable(config);
$: _percentRange.set(percentRange);
$: _containerWidth.set(containerWidth);
Expand Down Expand Up @@ -273,8 +273,7 @@
yRange: yRange_d,
zRange: zRange_d,
rRange: rRange_d,
originalSettings: _originalSettings, // Keep this for legacy compatibility
config: _originalSettings,
config: _config,
xScale: xScale_d,
xGet: xGet_d,
yScale: yScale_d,
Expand Down

0 comments on commit 651ce7c

Please sign in to comment.