Adam Shaw 8 лет назад
Родитель
Сommit
5bcc5abdc6
3 измененных файлов с 4 добавлено и 7 удалено
  1. 1 1
      src/common/Grid.events.js
  2. 3 1
      src/models/event/EventDefMutation.js
  3. 0 5
      src/util.js

+ 1 - 1
src/common/Grid.events.js

@@ -1121,7 +1121,7 @@ Grid.mixin({
 	// Given an event's span (unzoned start/end and other misc data), and the event itself,
 	// slices into segments and attaches event-derived properties to them.
 	// eventSpan - { start, end, isStart, isEnd, otherthings... }
-	// constraintRange allow additional clipping. optional.
+	// constraintRange allow additional clipping. optional. eventually remove this.
 	eventFootprintToSegs: function(eventFootprint, constraintRange) {
 		var unzonedRange = eventFootprint.componentFootprint.unzonedRange;
 		var segs;

+ 3 - 1
src/models/event/EventDefMutation.js

@@ -64,7 +64,9 @@ EventDefMutation.createFromRawProps = function(eventInstance, newRawProps, large
 
 	for (propName in newRawProps) {
 		if (
-			isAtomic(newRawProps[propName]) &&
+			// ignore object-type custom properties and any date-related properties,
+			// as well as any other internal property
+			typeof newRawProps[propName] !== 'object' &&
 			propName !== 'start' && propName !== 'end' && propName !== 'allDay' &&
 			propName !== 'source' && propName !== '_id'
 		) {

+ 0 - 5
src/util.js

@@ -957,11 +957,6 @@ function removeExact(array, exactVal) {
 }
 
 
-// TODO: relocate
-function isAtomic(val) {
-	return typeof val !== 'object';
-}
-
 
 function firstDefined() {
 	for (var i=0; i<arguments.length; i++) {