Skip to content

Commit

Permalink
refactor layers
Browse files Browse the repository at this point in the history
  • Loading branch information
BigFatDog committed Mar 24, 2018
1 parent beebdb2 commit 7a8d862
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 0 additions & 4 deletions src/baseChart/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/color/scale/generic.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { max } from 'd3-array';

import Globals from '../../baseChart/Globals';
import Globals from '../../layer/Globals';

import gradientColor from './gradient';
import distinctColor from './distinct';
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { version } from '../package.json';

export * from './baseChart';
export * from './layer';
export * from './color';
export * from './options';
export * from './util';
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/baseChart/canvasChart.js → src/layer/canvasLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const CanvasState = {
_animationState: null,
};

const canvas = (containerId, opt, composers = defaultComposers) => {
const canvasLayer = (containerId, opt, composers = defaultComposers) => {
const state = Object.assign(
{},
initState(containerId, opt, composers),
Expand All @@ -43,4 +43,4 @@ const canvas = (containerId, opt, composers = defaultComposers) => {
);
};

export default canvas;
export default canvasLayer;
File renamed without changes.
4 changes: 4 additions & 0 deletions src/layer/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { default as svgLayer } from './svgLayer';
export { default as canvasLayer } from './canvasLayer';
export { default as Globals } from './Globals';
export * from './compose';
4 changes: 2 additions & 2 deletions src/baseChart/svgChart.js → src/layer/svgLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const defaultComposers = {
color: (color, data, opt) => genericColor(color),
};

const svg = (containerId, opt, composers = defaultComposers) => {
const svgLayer = (containerId, opt, composers = defaultComposers) => {
const state = initState(containerId, opt, composers);

return Object.assign(
Expand All @@ -29,4 +29,4 @@ const svg = (containerId, opt, composers = defaultComposers) => {
);
};

export default svg;
export default svgLayer;
2 changes: 1 addition & 1 deletion src/options/DefaultCategoricalColor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Globals from '../baseChart/Globals';
import Globals from '../layer/Globals';
import { TheMetLight } from '../color/preset/metropolis';

const DefaultCategoricalColor = {
Expand Down
2 changes: 1 addition & 1 deletion src/options/DefaultSequentialColor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Globals from '../baseChart/Globals';
import Globals from '../layer/Globals';
import { MetroRain3 } from '../color/preset/metropolis';

const DefaultSequentialColor = {
Expand Down

0 comments on commit 7a8d862

Please sign in to comment.