Comparing version 0.0.2 to 0.0.3
19
Clock.js
@@ -23,3 +23,3 @@ const d3 = require("d3"); | ||
const scaleDomain = function(date, row_type) { | ||
const scaleDomain = (date, row_type) => { | ||
let start_of_time = new Date(date.getTime()); | ||
@@ -42,3 +42,3 @@ let end_of_time = new Date(date.getTime()); | ||
const scaleRange = function(row_type) { | ||
const scaleRange = row_type => { | ||
let multiplier = row_type === "hour" ? 4 : 2; | ||
@@ -55,3 +55,3 @@ | ||
*/ | ||
const drawRow = function(row_angle, row_type) { | ||
const drawRow = (row_angle, row_type) => { | ||
this.clock.select(`path.${row_type}`).remove(); | ||
@@ -85,3 +85,3 @@ | ||
*/ | ||
const drawCircle = function(class_name, radius) { | ||
const drawCircle = (class_name, radius) => { | ||
this.clock.append("circle") | ||
@@ -101,3 +101,3 @@ .classed(class_name, true) | ||
*/ | ||
const drawTicks = function(type) { | ||
const drawTicks = type => { | ||
const tick_params = { | ||
@@ -138,3 +138,3 @@ hour: {angle: 30, stroke_width: "3px"}, | ||
*/ | ||
this.showDigitTime = function() { | ||
this.showDigitTime = () => { | ||
this.digit_clock_as_text = true; | ||
@@ -151,3 +151,3 @@ | ||
*/ | ||
this.setText = function(text, link = "") { | ||
this.setText = (text, link = "") => { | ||
this.clock_text = text; | ||
@@ -161,3 +161,3 @@ this.clock_link = link; | ||
this.draw = function() { | ||
this.draw = () => { | ||
if(this.show_main_circle) { | ||
@@ -189,3 +189,2 @@ drawCircle("main-circle", this.radius); | ||
} | ||
@@ -200,3 +199,3 @@ | ||
*/ | ||
this.appendText = function(is_digit_clock) { | ||
this.appendText = is_digit_clock => { | ||
var class_name = is_digit_clock ? "digit-clock" : "clock-link"; | ||
@@ -203,0 +202,0 @@ |
{ | ||
"name": "clockd3js", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Clock writen with d3js", | ||
@@ -5,0 +5,0 @@ "main": "Clock.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6704