@colijnit/corecomponents_v12 255.1.15 → 255.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14433,16 +14433,18 @@
14433
14433
  start.setHours(parseInt(hourSplit[0]));
14434
14434
  start.setMinutes(parseInt(hourSplit[1]));
14435
14435
  var scheduledObject = this.scheduledObjects.find(function (scheduledObject) { return scheduledObject.id === _this.currentDraggingObject.id; });
14436
- scheduledObject.start = start;
14437
- var originalObject = this.schedule[this.objectsProp].find(function (object) { return object[_this.idProp] === _this.currentDraggingObject.id; });
14438
- originalObject[this.startTimeProp] = start;
14439
- var end = this.addMinutes(originalObject[this.startTimeProp], this.currentDraggingObject.height);
14440
- originalObject[this.endTimeProp] = end;
14441
- scheduledObject.end = end;
14442
- scheduledObject.top = this.timeDifference(this.schedule[this.childProp][this.startTimeProp], scheduledObject.start);
14443
- scheduledObject.height = this.timeDifference(scheduledObject.start, scheduledObject.end);
14444
- this.timeChangeEvent.emit(originalObject);
14445
- this.currentDraggingObject = undefined;
14436
+ if (scheduledObject) {
14437
+ scheduledObject.start = start;
14438
+ var originalObject = this.schedule[this.objectsProp].find(function (object) { return object[_this.idProp] === _this.currentDraggingObject.id; });
14439
+ originalObject[this.startTimeProp] = start;
14440
+ var end = this.addMinutes(originalObject[this.startTimeProp], this.currentDraggingObject.height);
14441
+ originalObject[this.endTimeProp] = end;
14442
+ scheduledObject.end = end;
14443
+ scheduledObject.top = this.timeDifference(this.schedule[this.childProp][this.startTimeProp], scheduledObject.start);
14444
+ scheduledObject.height = this.timeDifference(scheduledObject.start, scheduledObject.end);
14445
+ this.timeChangeEvent.emit(originalObject);
14446
+ this.currentDraggingObject = undefined;
14447
+ }
14446
14448
  }
14447
14449
  else {
14448
14450
  var parsed = this.tryParseJSONObject(dragEvent.dataTransfer.getData("text"));
@@ -14450,7 +14452,8 @@
14450
14452
  this.newObjectPlanEvent.emit({ currentHour: hour, data: parsed.toString() });
14451
14453
  return;
14452
14454
  }
14453
- this.moveBetweenCalendarsEvent.emit({ hour: hour, data: parsed });
14455
+ //Move between calendars is still too buggy
14456
+ // this.moveBetweenCalendarsEvent.emit({hour: hour, data: parsed});
14454
14457
  }
14455
14458
  };
14456
14459
  HourSchedulingExpandableComponent.prototype.allowDrop = function (event, hour) {