Skip to content

Commit

Permalink
remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
susielu committed Jun 28, 2018
1 parent 8fd683e commit f2c40b5
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 34 deletions.
5 changes: 2 additions & 3 deletions d3-annotation.independent.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion d3-annotation.independent.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion d3-annotation.independent.min.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions d3-annotation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion d3-annotation.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion d3-annotation.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/bundle.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/docs-compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ $(document).ready(function () {
var editMode = true;
var textWrap = 120;
var padding = types[typeKey].typeSettings.note.padding || 5;
console.log("TYPES", types[typeKey]);

var annotation = {
note: {
label: "Longer text to show text wrapping",
Expand Down Expand Up @@ -1027,7 +1027,7 @@ $(document).ready(function () {
typeSettings[type[0]][type[1]] = value;
}
}
console.log("ABOUT TO MAKE ANNOTTION", typeSettings);

currentType = d3.annotationCustomType(d3[typeKey], typeSettings);

updateAnnotations();
Expand Down Expand Up @@ -1123,7 +1123,7 @@ $(document).ready(function () {
};

d3.selectAll("#curveButtons ul.points li a").on("click", changePoints).on("pointerdown", changePoints);
console.log("CURRENT", currentType);

window.makeAnnotations = d3.annotation().editMode(editMode).type(currentType).annotations([annotation]);

d3.select(".sandbox").append("g").attr("class", "sandbox-annotations").call(makeAnnotations);
Expand Down Expand Up @@ -1203,7 +1203,7 @@ $(document).ready(function () {
} else if (typeKey == "annotationBadge") {
subjectText = " subject: {\n" + ' text: "A",\n' + " radius: 14\n" + " }\n";
}
console.log(types[typeKey]);

d3.select("#sandbox-code code").text(typeText + "\n" + "const annotations = [{\n" + " note: {\n" + ' label: "Longer text to show text wrapping",\n' + (types[typeKey] && types[typeKey].typeSettings.note && types[typeKey].typeSettings.note.bgPadding && " bgPadding: " + JSON.stringify(types[typeKey].typeSettings.note.bgPadding) + ",\n" || "") + ' title: "Annotations :)"\n' + " },\n" + " //can use x, y directly instead of data\n" + ' data: { date: "18-Sep-09", close: 185.02 },\n' + (types[typeKey] && types[typeKey].typeSettings.className && " className: " + JSON.stringify(types[typeKey].typeSettings.className) + ",\n" || "") + " dy: 137,\n" + (" dx: 162" + (curveText !== "" || subjectText !== "" ? "," : "") + "\n") + curveText + (subjectText !== "" && curveText !== "" ? ",\n" : "") + subjectText + "}]\n" + "\n" + 'const parseTime = d3.timeParse("%d-%b-%y")\n' + 'const timeFormat = d3.timeFormat("%d-%b-%y")\n' + "\n" + "//Skipping setting domains for sake of example\n" + "const x = d3.scaleTime().range([0, 800])\n" + "const y = d3.scaleLinear().range([300, 0])\n" + "\n" + "const makeAnnotations = d3.annotation()\n" + editModeText + disableText + textWrapText + paddingText + " .type(type)\n" + " //accessors & accessorsInverse not needed\n" + " //if using x, y in annotations JSON\n" + " .accessors({\n" + " x: d => x(parseTime(d.date)),\n" + " y: d => y(d.close)\n" + " })\n" + " .accessorsInverse({\n" + " date: d => timeFormat(x.invert(d.x)),\n" + " close: d => y.invert(d.y)\n" + " })\n" + " .annotations(annotations)\n" + "\n" + 'd3.select("svg")\n' + ' .append("g")\n' + ' .attr("class", "annotation-group")\n' + " .call(makeAnnotations)\n");

$("#sandbox-code code").each(function (i, block) {
Expand Down
8 changes: 4 additions & 4 deletions docs/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ $(document).ready(function() {
let editMode = true
let textWrap = 120
let padding = types[typeKey].typeSettings.note.padding || 5
console.log("TYPES", types[typeKey])

const annotation = {
note: {
label: "Longer text to show text wrapping",
Expand Down Expand Up @@ -238,7 +238,7 @@ $(document).ready(function() {
typeSettings[type[0]][type[1]] = value
}
}
console.log("ABOUT TO MAKE ANNOTTION", typeSettings)

currentType = d3.annotationCustomType(d3[typeKey], typeSettings)

updateAnnotations()
Expand Down Expand Up @@ -355,7 +355,7 @@ $(document).ready(function() {
d3.selectAll("#curveButtons ul.points li a")
.on("click", changePoints)
.on("pointerdown", changePoints)
console.log("CURRENT", currentType)

window.makeAnnotations = d3
.annotation()
.editMode(editMode)
Expand Down Expand Up @@ -472,7 +472,7 @@ $(document).ready(function() {
subjectText =
` subject: {\n` + ' text: "A",\n' + " radius: 14\n" + " }\n"
}
console.log(types[typeKey])

d3.select("#sandbox-code code").text(
typeText +
"\n" +
Expand Down
5 changes: 2 additions & 3 deletions indexRollup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion indexRollup.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions indexRollupNext.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion indexRollupNext.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/Types-d3.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class Type {
annotation.disable.indexOf("subject") === -1 &&
a.select("g.annotation-subject")
this.dispatcher = dispatcher
console.log("ANNOTATION", annotation)

if (dispatcher) {
const handler = addHandlers.bind(null, dispatcher, annotation)
handler({ component: this.note, name: "note" })
Expand Down Expand Up @@ -504,7 +504,6 @@ export class d3NoteText extends Type {
this.typeSettings.note &&
this.typeSettings.note.bgPadding

console.log(this.annotation.note)
let bgPaddingFinal = { top: 0, bottom: 0, left: 0, right: 0 }
if (typeof bgPadding === "number") {
bgPaddingFinal = {
Expand Down Expand Up @@ -533,7 +532,7 @@ export class d3NoteText extends Type {
label.attr("fill", this.annotation.color)

const bbox = this.getNoteBBox()
console.log("BG", bgPaddingFinal)

this.a
.select("rect.annotation-note-bg")
.attr("width", bbox.width + bgPaddingFinal.left + bgPaddingFinal.right)
Expand Down

0 comments on commit f2c40b5

Please sign in to comment.