react-big-calendar
Advanced tools
Comparing version 1.14.0 to 1.14.1
@@ -0,1 +1,8 @@ | ||
## [1.14.1](https://github.com/jquense/react-big-calendar/compare/v1.14.0...v1.14.1) (2024-09-16) | ||
### Bug Fixes | ||
* **dnd:** added check for null dragFromOutsideItem, updated example ([#2651](https://github.com/jquense/react-big-calendar/issues/2651)) ([17e62a3](https://github.com/jquense/react-big-calendar/commit/17e62a3d3bf999197e24bd9fb6e68b4cb0fc4873)), closes [#2616](https://github.com/jquense/react-big-calendar/issues/2616) [#2383](https://github.com/jquense/react-big-calendar/issues/2383) | ||
# [1.14.0](https://github.com/jquense/react-big-calendar/compare/v1.13.4...v1.14.0) (2024-09-12) | ||
@@ -2,0 +9,0 @@ |
@@ -59,2 +59,12 @@ "use strict"; | ||
}; | ||
_this.handleDragOverFromOutside = function (point, bounds) { | ||
var slotMetrics = _this.props.slotMetrics; | ||
var start = slotMetrics.closestSlotFromPoint({ | ||
y: point.y, | ||
x: point.x | ||
}, bounds); | ||
var end = slotMetrics.nextSlot(start); | ||
var event = _this.context.draggable.dragFromOutsideItem(); | ||
_this.update(event, slotMetrics.getRange(start, end, false, true)); | ||
}; | ||
_this.updateParentScroll = function (parent, node) { | ||
@@ -115,6 +125,8 @@ setTimeout(function () { | ||
}); | ||
selector.on('dragOver', function (point) { | ||
if (!_this.context.draggable.dragFromOutsideItem) return; | ||
selector.on('dragOverFromOutside', function (point) { | ||
var item = _this.context.draggable.dragFromOutsideItem ? _this.context.draggable.dragFromOutsideItem() : null; | ||
if (!item) return; | ||
var bounds = (0, _Selection.getBoundsForNode)(node); | ||
_this.handleDropFromOutside(point, bounds); | ||
if (!(0, _common.pointInColumn)(bounds, point)) return _this.reset(); | ||
_this.handleDragOverFromOutside(point, bounds); | ||
}); | ||
@@ -121,0 +133,0 @@ selector.on('selectStart', function () { |
@@ -65,4 +65,5 @@ "use strict"; | ||
_this.handleDragOverFromOutside = function (point, node) { | ||
if (!_this.context.draggable.dragFromOutsideItem) return; | ||
_this.handleMove(point, node, _this.context.draggable.dragFromOutsideItem()); | ||
var item = _this.context.draggable.dragFromOutsideItem ? _this.context.draggable.dragFromOutsideItem() : null; | ||
if (!item) return; | ||
_this.handleMove(point, node, item); | ||
}; | ||
@@ -69,0 +70,0 @@ _this._selectable = function () { |
{ | ||
"name": "react-big-calendar", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"description": "Calendar! with events", | ||
@@ -5,0 +5,0 @@ "author": { |
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
2548777
55699