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

@r365/react-calendar-timeline

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@r365/react-calendar-timeline - npm Package Compare versions

Comparing version 0.25.0-beta.11 to 0.25.0-beta.12

47

lib/lib/items/Item.js

@@ -383,3 +383,2 @@ 'use strict';

this.cacheDataFromProps(this.props);
var interactMounted = this.state.interactMounted;

@@ -394,24 +393,30 @@

if (this.props.selected && !interactMounted && !!this.item) {
this.mountInteract();
interactMounted = true;
}
if (!!this.item) {
if (this.props.selected && !interactMounted) {
this.mountInteract();
interactMounted = true;
}
if (interactMounted && (couldResizeLeft !== willBeAbleToResizeLeft || couldResizeRight !== willBeAbleToResizeRight)) {
var leftResize = this.props.useResizeHandle ? this.dragLeft : true;
var rightResize = this.props.useResizeHandle ? this.dragRight : true;
if (interactMounted && !!this.item && (couldResizeLeft !== willBeAbleToResizeLeft || couldResizeRight !== willBeAbleToResizeRight)) {
var leftResize = this.props.useResizeHandle ? this.dragLeft : true;
var rightResize = this.props.useResizeHandle ? this.dragRight : true;
(0, _interactjs2.default)(this.item).resizable({
enabled: willBeAbleToResizeLeft || willBeAbleToResizeRight,
edges: {
top: false,
bottom: false,
left: willBeAbleToResizeLeft && leftResize,
right: willBeAbleToResizeRight && rightResize
}
});
(0, _interactjs2.default)(this.item).resizable({
enabled: willBeAbleToResizeLeft || willBeAbleToResizeRight,
edges: {
top: false,
bottom: false,
left: willBeAbleToResizeLeft && leftResize,
right: willBeAbleToResizeRight && rightResize
}
});
}
if (interactMounted && couldDrag !== willBeAbleToDrag) {
(0, _interactjs2.default)(this.item).draggable({ enabled: willBeAbleToDrag });
}
} else {
interactMounted = false;
}
if (interactMounted && !!this.item && couldDrag !== willBeAbleToDrag) {
(0, _interactjs2.default)(this.item).draggable({ enabled: willBeAbleToDrag });
}
this.setState({
interactMounted: interactMounted
});
}

@@ -418,0 +423,0 @@ }, {

{
"name": "@r365/react-calendar-timeline",
"version": "0.25.0-beta.11",
"version": "0.25.0-beta.12",
"description": "react calendar timeline",

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

@@ -417,3 +417,2 @@ import { Component } from 'react'

this.cacheDataFromProps(this.props)
let { interactMounted } = this.state

@@ -431,28 +430,36 @@ const couldDrag = prevProps.selected && this.canMove(prevProps)

if (this.props.selected && !interactMounted && !!this.item) {
this.mountInteract()
interactMounted = true
if(!!this.item){
if (this.props.selected && !interactMounted) {
this.mountInteract()
interactMounted = true
}
if (
interactMounted &&
(couldResizeLeft !== willBeAbleToResizeLeft ||
couldResizeRight !== willBeAbleToResizeRight)
) {
const leftResize = this.props.useResizeHandle ? this.dragLeft : true
const rightResize = this.props.useResizeHandle ? this.dragRight : true
interact(this.item).resizable({
enabled: willBeAbleToResizeLeft || willBeAbleToResizeRight,
edges: {
top: false,
bottom: false,
left: willBeAbleToResizeLeft && leftResize,
right: willBeAbleToResizeRight && rightResize
}
})
}
if (interactMounted && couldDrag !== willBeAbleToDrag) {
interact(this.item).draggable({ enabled: willBeAbleToDrag })
}
}
else{
interactMounted= false;
}
this.setState({
interactMounted,
})
if (
interactMounted && !!this.item &&
(couldResizeLeft !== willBeAbleToResizeLeft ||
couldResizeRight !== willBeAbleToResizeRight)
) {
const leftResize = this.props.useResizeHandle ? this.dragLeft : true
const rightResize = this.props.useResizeHandle ? this.dragRight : true
interact(this.item).resizable({
enabled: willBeAbleToResizeLeft || willBeAbleToResizeRight,
edges: {
top: false,
bottom: false,
left: willBeAbleToResizeLeft && leftResize,
right: willBeAbleToResizeRight && rightResize
}
})
}
if (interactMounted && !!this.item && couldDrag !== willBeAbleToDrag) {
interact(this.item).draggable({ enabled: willBeAbleToDrag })
}
}

@@ -459,0 +466,0 @@

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