Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsgantt-improved

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsgantt-improved - npm Package Compare versions

Comparing version 2.2.8 to 2.2.9

21

dist/src/task.js

@@ -420,7 +420,7 @@ "use strict";

this.setStart = function (pStart) {
if (pStart) {
// pStart can be a Date, a number or a string
if (pStart instanceof Date) {
vStart = pStart;
}
else {
var temp = new Date(pStart);
// Check if date is valid
// If not, does not change the value
if (temp instanceof Date && !isNaN(temp.valueOf())) {

@@ -432,9 +432,9 @@ vStart = temp;

this.setEnd = function (pEnd) {
if (pEnd) {
// pEnd can be a Date, a number or a string
if (pEnd instanceof Date) {
vEnd = pEnd;
}
else {
var temp = new Date(pEnd);
// Check if date is valid
// If not, does not change the value
if (temp instanceof Date && !isNaN(temp.valueOf())) {
pEnd = temp;
vEnd = temp;
}

@@ -622,3 +622,4 @@ }

exports.ClearTasks = function () {
this.vTaskList = [];
var _this = this;
this.vTaskList.map(function (task) { return _this.RemoveTaskItem(task.getID()); });
this.vProcessNeeded = true;

@@ -625,0 +626,0 @@ };

@@ -276,3 +276,3 @@ [

"pName": "Loop each Task",
"pStart": "2018-07-26",
"pStart": "2018-03-26",
"pEnd": "2018-04-11",

@@ -279,0 +279,0 @@ "pClass": "gtaskred",

let dataurl;
let jsonObj;
let g;
function start(e) {
var g = new JSGantt.GanttChart(document.getElementById('embedded-Gantt'), 'week');
g = new JSGantt.GanttChart(document.getElementById('embedded-Gantt'), 'week');
if (g.getDivId() != null) {

@@ -155,2 +156,7 @@

function clearTasks(){
g.ClearTasks();
g.Draw()
}
function editValue(list, task, event, cell, column) {

@@ -157,0 +163,0 @@ const found = list.find(item => item.pID == task.getOriginalID());

{
"name": "jsgantt-improved",
"version": "2.2.8",
"version": "2.2.9",
"description": "jsgantt-improved",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -10,3 +10,3 @@ import * as lang from './lang';

} from './utils';
import { createTaskInfo, AddTaskItem, AddTaskItemObject, RemoveTaskItem, processRows } from './task';
import { createTaskInfo, AddTaskItem, AddTaskItemObject, RemoveTaskItem, processRows, ClearTasks } from './task';
import { includeGetSet } from './options';

@@ -133,2 +133,3 @@ import { getXMLProject, getXMLTask } from './xml';

this.RemoveTaskItem = RemoveTaskItem;
this.ClearTasks = ClearTasks;

@@ -135,0 +136,0 @@ this.getXMLProject = getXMLProject;

@@ -291,3 +291,3 @@ import { parseDateStr, isIE, stripUnwanted, internalPropertiesLang, formatDateStr, hashKey, internalProperties } from "./utils";

else if(vStart && vDuration) {
else if (vStart && vDuration) {
let date = new Date(vStart)

@@ -297,7 +297,7 @@ const vUnits = vDuration.split(' ')

switch (vUnits[1]) {
case 'hour': date.setMinutes(date.getMinutes()+(value*60)); break;
case 'day': date.setMinutes(date.getMinutes()+(value*60*24)); break;
case 'week': date.setMinutes(date.getMinutes()+(value*60*24*7));break;
case 'month': date.setMonth(date.getMonth()+(value)); break;
case 'quarter': date.setMonth(date.getMonth()+(value*3)); break;
case 'hour': date.setMinutes(date.getMinutes() + (value * 60)); break;
case 'day': date.setMinutes(date.getMinutes() + (value * 60 * 24)); break;
case 'week': date.setMinutes(date.getMinutes() + (value * 60 * 24 * 7)); break;
case 'month': date.setMonth(date.getMonth() + (value)); break;
case 'quarter': date.setMonth(date.getMonth() + (value * 3)); break;
}

@@ -332,3 +332,3 @@ return date

}
else if (!vEnd && vDuration) {return vDuration}
else if (!vEnd && vDuration) { return vDuration }
else {

@@ -348,3 +348,3 @@ let vUnits = null;

// let tmpPer = (getOffset(this.getStart(), vTaskEnd, 999, vUnits)) / 1000;
const hours = (this.getEnd().getTime() - this.getStart().getTime()) / 1000 / 60 / 60;

@@ -387,23 +387,19 @@ let tmpPer;

this.setStart = function (pStart) {
if (pStart) {
// pStart can be a Date, a number or a string
const temp = new Date(pStart);
// Check if date is valid
// If not, does not change the value
if (temp instanceof Date && !isNaN(temp.valueOf())) {
vStart = temp;
}
if (pStart instanceof Date) {
vStart = pStart;
} else {
const temp = new Date(pStart);
if (temp instanceof Date && !isNaN(temp.valueOf())) {
vStart = temp;
}
}
};
this.setEnd = function (pEnd) {
if (pEnd) {
// pEnd can be a Date, a number or a string
const temp = new Date(pEnd);
// Check if date is valid
// If not, does not change the value
if (temp instanceof Date && !isNaN(temp.valueOf())) {
pEnd = temp;
}
if (pEnd instanceof Date) {
vEnd = pEnd;
} else {
const temp = new Date(pEnd);
if (temp instanceof Date && !isNaN(temp.valueOf())) {
vEnd = temp;
}
}

@@ -577,3 +573,3 @@ };

export const ClearTasks = function () {
this.vTaskList = [];
this.vTaskList.map(task => this.RemoveTaskItem(task.getID()));
this.vProcessNeeded = true;

@@ -580,0 +576,0 @@ };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc