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

@botmock/editor

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@botmock/editor - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

11

components/block/index.js

@@ -35,9 +35,8 @@ import "../../styling/block.less";

if (this.contentRef.current) {
this.observer = new MutationObserver((mutationsList) => {
this.observer = new MutationObserver(() => {
this.recalculateDimensions();
for (let mutation of mutationsList) {
if (mutation.target.nodeName === 'IMG') {
mutation.target.onload = () => {
this.recalculateDimensions();
}
let imgChildren = this.contentRef.current.getElementsByTagName('IMG');
for (let img of imgChildren) {
img.onload = () => {
this.recalculateDimensions();
}

@@ -44,0 +43,0 @@ }

@@ -28,3 +28,3 @@ import "../../styling/connector.less";

shouldComponentUpdate(nextProps, nextState) {
return (
return nextProps.points && (
nextProps.highlightedMidPoints.length !==

@@ -36,3 +36,3 @@ this.props.highlightedMidPoints.length ||

).length ||
nextProps.points.length !== this.props.points.length ||
nextProps.points.length !== (this.props.points && this.props.points.length) ||
nextProps.points.filter(

@@ -74,2 +74,6 @@ (p, i) => !pointsAreEqual(p, this.props.points[i])

let segmentEndPoints = [];
if (!this.props.points) {
return [];
}
if (this.props.points.filter(point => !!point).length < 2) {

@@ -469,3 +473,3 @@ return this.props.points.filter(point => !!point);

let label;
if (this.props.label && this.props.to) {
if (this.props.label && this.props.label.text && this.props.to) {
label = (

@@ -472,0 +476,0 @@ <Label

@@ -77,3 +77,3 @@ ## Botmock Editor

`setTransform(transform:Transform)` - Sets the transform (pan and zoom)
`setTransform(transform:Transform, callback:Function)` - Sets the transform (pan and zoom)

@@ -88,2 +88,4 @@ `getTransform():Transform` - Gets the transform (pan and zoom)

`deselectConnector()` - Deselect the connector that is selected
`pageToPosition(pageX:Number, pageY:Number):Point` - Turns a pageX and pageY to a point in the editor

@@ -90,0 +92,0 @@

{
"name": "@botmock/editor",
"version": "0.1.1",
"version": "0.1.2",
"description": "Botmock Editor",

@@ -5,0 +5,0 @@ "main": "output/editor.esm.js",

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

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

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