cm-page-builder
Advanced tools
Comparing version 1.2.3 to 1.2.6
@@ -232,3 +232,3 @@ 'use strict'; | ||
this.handleMouseUp = function (e) { | ||
e.stopPropagation(); | ||
// e.stopPropagation() | ||
_this3.setState({ showActionBtn: e.target.innerHTML === '', isFocused: true }); | ||
@@ -235,0 +235,0 @@ _this3.props.setCurrentElem(_this3.props.id); |
@@ -104,5 +104,4 @@ 'use strict'; | ||
dangerouslySetInnerHTML: { __html: (0, _sanitizeHtml2.default)(content || '') }, | ||
styles: styles | ||
//onMouseUp={handleMouseUp} | ||
, 'data-gramm_editor': 'false', | ||
styles: styles, | ||
'data-gramm_editor': 'false', | ||
onSelect: context.handleSelection | ||
@@ -109,0 +108,0 @@ }) |
@@ -70,7 +70,2 @@ 'use strict'; | ||
_this.emitUpdate = function () { | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
console.log(args); | ||
if (_this.props.handleUpdate) { | ||
@@ -82,3 +77,3 @@ var _this$props; | ||
// } | ||
(_this$props = _this.props).handleUpdate.apply(_this$props, args); | ||
(_this$props = _this.props).handleUpdate.apply(_this$props, arguments); | ||
} | ||
@@ -114,3 +109,13 @@ }; | ||
_this.handleMouseUp = function (e) { | ||
e.persist(); | ||
_this.handleSelection(e); | ||
var conElem = document.querySelector('[data-container-block="true"]'); | ||
if (conElem.offsetHeight < e.pageY) { | ||
var appData = _this.props.appData; | ||
var lastElem = appData.componentData[appData.componentData.length - 1]; | ||
if ((!lastElem || lastElem.componentType !== 'Text' || lastElem.content) && !_this.props.newPage) { | ||
_this.props.addNewComponent({ id: lastElem && lastElem.id, componentType: 'Text' }); | ||
} | ||
} | ||
}; | ||
@@ -154,4 +159,4 @@ | ||
_this.editText = function (e) { | ||
e.stopPropagation(); | ||
var activeFormatting = _this.state.activeFormatting; | ||
//e.preventDefault() | ||
@@ -171,2 +176,3 @@ var action = e.currentTarget.dataset.action; | ||
_this.handleRangeSelection = function (e) { | ||
e.stopPropagation(); | ||
var activeFormatting = _this.state.activeFormatting; | ||
@@ -218,17 +224,2 @@ | ||
_this.handleMouseUp = function (e) { | ||
e.persist(); | ||
var conElem = document.querySelector('[data-container-block="true"]'); | ||
if (conElem.offsetHeight < e.pageY) { | ||
var appData = _this.props.appData; | ||
var lastElem = appData.componentData[appData.componentData.length - 1]; | ||
if ((!lastElem || lastElem.componentType !== 'Text' || lastElem.content) && !_this.props.newPage) { | ||
_this.props.addNewComponent({ id: lastElem && lastElem.id, componentType: 'Text' }); | ||
} | ||
} else { | ||
_this.props.removeCurrentElem(); | ||
} | ||
}; | ||
_this.showTooltip = function () { | ||
@@ -235,0 +226,0 @@ _this.setState({ showTooltip: true }); |
{ | ||
"name": "cm-page-builder", | ||
"version": "1.2.3", | ||
"version": "1.2.6", | ||
"description": "Awesome react starter kit", | ||
@@ -73,2 +73,3 @@ "main": "lib/page/index.js", | ||
"react-transition-group": "^4.0.1", | ||
"redux": "^4.0.1", | ||
"redux-thunk": "^2.3.0", | ||
@@ -75,0 +76,0 @@ "sanitize-html": "^1.20.1", |
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
126785
17
3030
+ Addedredux@^4.0.1