Relaxed focus targets to allow pasting of elements into templated containers.

This commit is contained in:
Sipke Schoorstra
2015-04-19 22:18:43 +02:00
parent dacdbdffb2
commit dd34d87ac9
5 changed files with 11 additions and 9 deletions

View File

@@ -144,9 +144,9 @@ var LayoutEditor;
this.setIsFocused = function () {
if (!this.editor)
return;
if (this.isTemplated)
return;
return;
if (this.isTemplated && this.isTemplatedContainer != true)
return;
if (this.editor.isDragging || this.editor.inlineEditingIsActive || this.editor.isResizing)
return;
@@ -393,6 +393,7 @@ var LayoutEditor;
LayoutEditor.Canvas = function (data, htmlId, htmlClass, htmlStyle, isTemplated, rule, children) {
LayoutEditor.Element.call(this, "Canvas", data, htmlId, htmlClass, htmlStyle, isTemplated, rule);
LayoutEditor.Container.call(this, ["Grid", "Content"], children);
this.isTemplatedContainer = true;
this.toObject = function () {
var result = this.elementToObject();
@@ -741,7 +742,7 @@ var LayoutEditor;
LayoutEditor.Column = function (data, htmlId, htmlClass, htmlStyle, isTemplated, width, offset, collapsible, rule, children) {
LayoutEditor.Element.call(this, "Column", data, htmlId, htmlClass, htmlStyle, isTemplated, rule);
LayoutEditor.Container.call(this, ["Grid", "Content"], children);
this.isTemplatedContainer = true;
this.width = width;
this.offset = offset;
this.collapsible = collapsible;

File diff suppressed because one or more lines are too long

View File

@@ -4,6 +4,7 @@
LayoutEditor.Canvas = function (data, htmlId, htmlClass, htmlStyle, isTemplated, rule, children) {
LayoutEditor.Element.call(this, "Canvas", data, htmlId, htmlClass, htmlStyle, isTemplated, rule);
LayoutEditor.Container.call(this, ["Grid", "Content"], children);
this.isTemplatedContainer = true;
this.toObject = function () {
var result = this.elementToObject();

View File

@@ -3,7 +3,7 @@
LayoutEditor.Column = function (data, htmlId, htmlClass, htmlStyle, isTemplated, width, offset, collapsible, rule, children) {
LayoutEditor.Element.call(this, "Column", data, htmlId, htmlClass, htmlStyle, isTemplated, rule);
LayoutEditor.Container.call(this, ["Grid", "Content"], children);
this.isTemplatedContainer = true;
this.width = width;
this.offset = offset;
this.collapsible = collapsible;

View File

@@ -68,9 +68,9 @@
this.setIsFocused = function () {
if (!this.editor)
return;
if (this.isTemplated)
return;
return;
if (this.isTemplated && this.isTemplatedContainer != true)
return;
if (this.editor.isDragging || this.editor.inlineEditingIsActive || this.editor.isResizing)
return;