Skip to content

Commit

Permalink
Fixed transition of class attribute as number.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderby committed Jan 4, 2017
1 parent de8485c commit a352966
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/elements/element.interval.js
Expand Up @@ -138,6 +138,8 @@ const Interval = {
const barW = config.flip ? 'height' : 'width';
const updateBarContainer = function () {
this.attr('class', 'frame i-role-bar-group');
const barClass = d3Attrs.class;
var updateAttrs = utils.omit(d3Attrs, 'class');
const bars = this.selectAll('.bar')
.data((fiber) => fiber, screenModel.id);
bars.exit()
Expand Down Expand Up @@ -165,15 +167,15 @@ const Interval = {
bars.call(createUpdateFunc(
config.guide.animationSpeed,
null,
d3Attrs
));
updateAttrs
)).attr('class', barClass);
bars.enter()
.append('rect')
.call(createUpdateFunc(
config.guide.animationSpeed,
{[barY]: screenModel[`${barY}0`], [barH]: 0},
d3Attrs
));
updateAttrs
)).attr('class', barClass);

node.subscribe(bars);
};
Expand Down

0 comments on commit a352966

Please sign in to comment.