Skip to content

Commit

Permalink
artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwoodhull committed Dec 6, 2014
1 parent f590cdb commit da2d4ee
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
15 changes: 8 additions & 7 deletions dc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* dc %VERSION%
* dc 2.0.0-alpha.2
* http://dc-js.github.io/dc.js/
* Copyright 2012 Nick Zhu and other contributors
*
Expand All @@ -20,7 +20,7 @@
'use strict';

/**
#### Version %VERSION%
#### Version 2.0.0-alpha.2
The entire dc.js library is scoped under the **dc** name space. It does not introduce anything else
into the global name space.
#### Function Chaining
Expand All @@ -41,7 +41,7 @@ that are chainable d3 objects.)
/*jshint -W062*/
/*jshint -W079*/
var dc = {
version: '%VERSION%',
version: '2.0.0-alpha.2',
constants: {
CHART_CLASS: 'dc-chart',
DEBUG_GROUP_CLASS: 'debug',
Expand Down Expand Up @@ -463,10 +463,11 @@ dc.utils.nameToId = function (name) {
return name.toLowerCase().replace(/[\s]/g, '_').replace(/[\.']/g, '');
};

dc.utils.appendOrSelect = function (parent, name) {
var element = parent.select(name);
dc.utils.appendOrSelect = function (parent, selector, tag) {
tag = tag || selector;
var element = parent.select(selector);
if (element.empty()) {
element = parent.append(name);
element = parent.append(tag);
}
return element;
};
Expand Down Expand Up @@ -2890,7 +2891,7 @@ dc.coordinateGridMixin = function (_chart) {
// cannot select <clippath> elements; bug in WebKit, must select by id
// https://groups.google.com/forum/#!topic/d3-js/6EpAzQ2gU9I
var id = getClipPathId();
var chartBodyClip = dc.utils.appendOrSelect(defs, id).attr('id', id);
var chartBodyClip = dc.utils.appendOrSelect(defs, '#' + id, 'clipPath').attr('id', id);

var padding = _clipPadding * 2;

Expand Down
2 changes: 1 addition & 1 deletion dc.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dc.min.js.map

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions web/js/dc.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,11 @@ dc.utils.nameToId = function (name) {
return name.toLowerCase().replace(/[\s]/g, '_').replace(/[\.']/g, '');
};

dc.utils.appendOrSelect = function (parent, name) {
var element = parent.select(name);
dc.utils.appendOrSelect = function (parent, selector, tag) {
tag = tag || selector;
var element = parent.select(selector);
if (element.empty()) {
element = parent.append(name);
element = parent.append(tag);
}
return element;
};
Expand Down Expand Up @@ -2890,7 +2891,7 @@ dc.coordinateGridMixin = function (_chart) {
// cannot select <clippath> elements; bug in WebKit, must select by id
// https://groups.google.com/forum/#!topic/d3-js/6EpAzQ2gU9I
var id = getClipPathId();
var chartBodyClip = dc.utils.appendOrSelect(defs, id).attr('id', id);
var chartBodyClip = dc.utils.appendOrSelect(defs, '#' + id, 'clipPath').attr('id', id);

This comment has been minimized.

Copy link
@Frozenlock

Frozenlock Jan 6, 2015

Contributor

I get an error in Chromium and Firefox when using dc.js/dc.min.js from this point on.

The error is Chromium:

Uncaught SyntaxError: Failed to execute 'querySelector' on 'Element': '#1-clip' is not a valid selector.

This comment has been minimized.

Copy link
@gordonwoodhull

gordonwoodhull Jan 6, 2015

Author Contributor

Yes, this is #789, and we will apply the fix in #800 very soon. We were lacking a test case for anonymous divs.


var padding = _clipPadding * 2;

Expand Down

0 comments on commit da2d4ee

Please sign in to comment.