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.4.5 to 2.4.6

5

dist/src/draw.js

@@ -595,3 +595,8 @@ "use strict";

if (this.vTaskList[i].getStartVar()) {
// textbar
vTmpDiv2 = draw_utils_1.newNode(vTmpDiv, 'div', this.vDivId + 'taskbar_' + vID, this.vTaskList[i].getClass(), null, vTaskWidth);
if (this.vTaskList[i].getBarText()) {
console.log(vTaskWidth);
var textBar = draw_utils_1.newNode(vTmpDiv2, 'span', this.vDivId + 'tasktextbar_' + vID, 'textbar', this.vTaskList[i].getBarText(), this.vTaskList[i].getCompRestStr());
}
this.vTaskList[i].setTaskDiv(vTmpDiv2);

@@ -598,0 +603,0 @@ }

7

dist/src/json.js

@@ -62,2 +62,3 @@ "use strict";

var duration = '';
var bartext = '';
var additionalObject = {};

@@ -144,2 +145,6 @@ for (var prop in pJsonObj[index]) {

break;
case 'bartext':
case 'pbartext':
bartext = value;
break;
default:

@@ -150,3 +155,3 @@ additionalObject[property.toLowerCase()] = value;

//if (id != undefined && !isNaN(parseInt(id)) && isFinite(id) && name && start && end && itemClass && completion != undefined && !isNaN(parseFloat(completion)) && isFinite(completion) && !isNaN(parseInt(parent)) && isFinite(parent)) {
pGanttVar.AddTaskItem(new task_1.TaskItem(id, name_1, start, end, itemClass, link, milestone, resourceName, completion, group, parent_1, open_1, dependsOn, caption, notes, pGanttVar, cost, planstart, planend, duration, additionalObject));
pGanttVar.AddTaskItem(new task_1.TaskItem(id, name_1, start, end, itemClass, link, milestone, resourceName, completion, group, parent_1, open_1, dependsOn, caption, notes, pGanttVar, cost, planstart, planend, duration, bartext, additionalObject));
//}

@@ -153,0 +158,0 @@ }

@@ -66,5 +66,5 @@ "use strict";

});
return new exports.TaskItem(object.pID, object.pName, object.pStart, object.pEnd, object.pClass, object.pLink, object.pMile, object.pRes, object.pComp, object.pGroup, object.pParent, object.pOpen, object.pDepend, object.pCaption, object.pNotes, object.pGantt, object.pCost, object.pPlanStart, object.pPlanEnd, object.pDuration, object);
return new exports.TaskItem(object.pID, object.pName, object.pStart, object.pEnd, object.pClass, object.pLink, object.pMile, object.pRes, object.pComp, object.pGroup, object.pParent, object.pOpen, object.pDepend, object.pCaption, object.pNotes, object.pGantt, object.pCost, object.pPlanStart, object.pPlanEnd, object.pDuration, object.pBarText, object);
};
exports.TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt, pCost, pPlanStart, pPlanEnd, pDuration, pDataObject) {
exports.TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt, pCost, pPlanStart, pPlanEnd, pDuration, pBarText, pDataObject) {
if (pCost === void 0) { pCost = null; }

@@ -74,2 +74,3 @@ if (pPlanStart === void 0) { pPlanStart = null; }

if (pDuration === void 0) { pDuration = null; }
if (pBarText === void 0) { pBarText = null; }
if (pDataObject === void 0) { pDataObject = null; }

@@ -105,2 +106,3 @@ var vGantt = pGantt ? pGantt : this;

var vDuration = pDuration || '';
var vBarText = pBarText || '';
var vLevel = 0;

@@ -259,2 +261,8 @@ var vNumKid = 0;

return ''; };
this.getCompRestStr = function () { if (vComp)
return (100 - vComp) + '%';
else if (vCompVal)
return (100 - vCompVal) + '%';
else
return ''; };
this.getNotes = function () { return vNotes; };

@@ -318,2 +326,3 @@ this.getSortIdx = function () { return vSortIdx; };

};
this.getBarText = function () { return vBarText; };
this.getParent = function () { return vParent; };

@@ -416,2 +425,4 @@ this.getGroup = function () { return vGroup; };

};
this.setBarText = function (pBarText) { if (pBarText)
vBarText = pBarText; };
this.setBarDiv = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement)

@@ -418,0 +429,0 @@ vBarDiv = pDiv; };

5

docs/fixes/data.json

@@ -277,3 +277,3 @@ [

"pID": 341,
"pName": "Loop each Task",
"pName": "Test Bar Task",
"pStart": "2019-03-26",

@@ -291,3 +291,4 @@ "pEnd": "2019-04-11",

"pCaption": "",
"pNotes": ""
"pNotes": "",
"pBarText": "this is a bar text"
},

@@ -294,0 +295,0 @@ {

@@ -63,2 +63,3 @@

pNotes: "Some Notes text",
pBarText: "ex. bar text",
category: "My Category",

@@ -74,3 +75,3 @@ sector: "Finance"

Method definition:
**TaskItem(_pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt_)**
**TaskItem(_pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt_, pCost = null, pPlanStart = null, pPlanEnd = null, pDuration = null, pBarText = null, pDataObject = null)**

@@ -97,3 +98,4 @@ | Parameter | Description |

|_pGantt:_|(required) javascript JSGantt.GanttChart object from which to take settings. Defaults to "g" for backwards compatibility|
|_pCost:_| cost of that task, numeric
|_pCost:_| cost of that task, numeric
|_pBarText:_|(optional) Use to include text inside a task bar|

@@ -131,2 +133,3 @@ <sup>*</sup> Combined group tasks show all sub-tasks on one row. The information displayed in the task list and row caption are taken from the parent task. Tool tips are generated individually for each sub-task from its own information. Milestones are not valid as sub-tasks of a combined group task and will not be displayed. No bounds checking of start and end dates of sub-tasks is performed therefore it is possible for these task bars to overlap. Dependencies can be set to and from sub-tasks only.

"pNotes": "Some Notes text",
"pBarText": "ex. bar text",
"category": "My Category",

@@ -522,2 +525,3 @@ "sector": "Finance"

pNotes: "Some Notes text",
pBarText: "ex. bar text",
category: "My Category",

@@ -524,0 +528,0 @@ sector: "Finance"

{
"name": "jsgantt-improved",
"version": "2.4.5",
"version": "2.4.6",
"description": "jsgantt-improved",

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

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

import {
getOffset, getScrollbarWidth
getOffset, getScrollbarWidth
} from './utils/general_utils';

@@ -655,5 +655,10 @@ import { createTaskInfo, AddTaskItem, AddTaskItemObject, RemoveTaskItem, processRows, ClearTasks } from './task';

this.vTaskList[i].setBarDiv(vTmpDiv);
if (this.vTaskList[i].getStartVar()) {
if (this.vTaskList[i].getStartVar()) {
// textbar
vTmpDiv2 = newNode(vTmpDiv, 'div', this.vDivId + 'taskbar_' + vID, this.vTaskList[i].getClass(), null, vTaskWidth);
if (this.vTaskList[i].getBarText()) {
console.log(vTaskWidth)
const textBar = newNode(vTmpDiv2, 'span', this.vDivId + 'tasktextbar_' + vID, 'textbar', this.vTaskList[i].getBarText(), this.vTaskList[i].getCompRestStr());
}
this.vTaskList[i].setTaskDiv(vTmpDiv2);

@@ -769,3 +774,3 @@ }

else {
if(this.vScrollTo === 'today'){
if (this.vScrollTo === 'today') {
vScrollDate = new Date();

@@ -772,0 +777,0 @@ } else if (this.vScrollTo instanceof Date) {

@@ -63,2 +63,3 @@ import { TaskItem } from "./task";

let duration = '';
let bartext = '';
const additionalObject = {};

@@ -146,2 +147,6 @@

break;
case 'bartext':
case 'pbartext':
bartext = value;
break;
default:

@@ -153,5 +158,8 @@ additionalObject[property.toLowerCase()] = value;

//if (id != undefined && !isNaN(parseInt(id)) && isFinite(id) && name && start && end && itemClass && completion != undefined && !isNaN(parseFloat(completion)) && isFinite(completion) && !isNaN(parseInt(parent)) && isFinite(parent)) {
pGanttVar.AddTaskItem(new TaskItem(id, name, start, end, itemClass, link, milestone, resourceName, completion, group, parent, open, dependsOn, caption, notes, pGanttVar, cost, planstart, planend, duration, additionalObject));
pGanttVar.AddTaskItem(new TaskItem(id, name, start, end, itemClass, link,
milestone, resourceName, completion, group, parent, open, dependsOn,
caption, notes, pGanttVar, cost, planstart, planend, duration, bartext,
additionalObject));
//}
}
};

@@ -74,2 +74,3 @@ import { isIE, stripUnwanted, internalPropertiesLang, hashKey, internalProperties } from "./utils/general_utils";

object.pDuration,
object.pBarText,
object

@@ -80,3 +81,3 @@ );

export const TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen,
pDepend, pCaption, pNotes, pGantt, pCost = null, pPlanStart = null, pPlanEnd = null, pDuration = null, pDataObject = null) {
pDepend, pCaption, pNotes, pGantt, pCost = null, pPlanStart = null, pPlanEnd = null, pDuration = null, pBarText = null, pDataObject = null) {
let vGantt = pGantt ? pGantt : this;

@@ -114,2 +115,3 @@ let _id = document.createTextNode(pID).data;

let vDuration = pDuration || '';
let vBarText = pBarText || '';
let vLevel = 0;

@@ -242,2 +244,3 @@ let vNumKid = 0;

this.getCompStr = function () { if (vComp) return vComp + '%'; else if (vCompVal) return vCompVal + '%'; else return ''; };
this.getCompRestStr = function () { if (vComp) return (100 - vComp) + '%'; else if (vCompVal) return (100 - vCompVal) + '%'; else return ''; };
this.getNotes = function () { return vNotes; };

@@ -279,2 +282,3 @@ this.getSortIdx = function () { return vSortIdx; };

this.getBarText = function () { return vBarText; };
this.getParent = function () { return vParent; };

@@ -362,2 +366,4 @@ this.getGroup = function () { return vGroup; };

};
this.setBarText = function (pBarText) { if (pBarText) vBarText = pBarText; };
this.setBarDiv = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement) vBarDiv = pDiv; };

@@ -364,0 +370,0 @@ this.setTaskDiv = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement) vTaskDiv = pDiv; };

Sorry, the diff of this file is not supported yet

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 not supported yet

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

Sorry, the diff of this file is not supported yet

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