Skip to content
Snippets Groups Projects
Commit 277c2ec9 authored by Julian's avatar Julian
Browse files

Reformat

parent 6819157a
No related branches found
No related tags found
1 merge request!12Pass dragging information to slot for disabled fields
Pipeline #142931 passed
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
......
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
// Moved to gridA // Moved to gridA
this.findAndRemove( this.findAndRemove(
item.originGridId === "gridB" ? this.placedB : this.placedC, item.originGridId === "gridB" ? this.placedB : this.placedC,
item.key item.key,
); );
this.placedA.push(item.key); this.placedA.push(item.key);
break; break;
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
// Moved to gridB // Moved to gridB
this.findAndRemove( this.findAndRemove(
item.originGridId === "gridA" ? this.placedA : this.placedC, item.originGridId === "gridA" ? this.placedA : this.placedC,
item.key item.key,
); );
this.placedB.push(item.key); this.placedB.push(item.key);
break; break;
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
// Moved to gridC // Moved to gridC
this.findAndRemove( this.findAndRemove(
item.originGridId === "gridB" ? this.placedB : this.placedA, item.originGridId === "gridB" ? this.placedB : this.placedA,
item.key item.key,
); );
this.placedC.push(item.key); this.placedC.push(item.key);
break; break;
......
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
let element = JSON.parse(data); let element = JSON.parse(data);
let coords = this.getCoords( let coords = this.getCoords(
event.dragEvent.client.x - element.mouseX, event.dragEvent.client.x - element.mouseX,
event.dragEvent.client.y - element.mouseY event.dragEvent.client.y - element.mouseY,
); );
if (element.context !== this.context || this.noHighlight) { if (element.context !== this.context || this.noHighlight) {
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
let coords = this.getCoords( let coords = this.getCoords(
event.dragEvent.client.x - element.mouseX, event.dragEvent.client.x - element.mouseX,
event.dragEvent.client.y - element.mouseY event.dragEvent.client.y - element.mouseY,
); );
let newPositionValid = true; let newPositionValid = true;
...@@ -264,7 +264,7 @@ export default { ...@@ -264,7 +264,7 @@ export default {
if (e.code === DOMException.DATA_CLONE_ERR) { if (e.code === DOMException.DATA_CLONE_ERR) {
// We use functions for properties → we can't clone; only emit `item-changed` event // We use functions for properties → we can't clone; only emit `item-changed` event
console.debug( console.debug(
"Grid couldn't be cloned, please listen to the `item-changed` event and handle changes yourself." "Grid couldn't be cloned, please listen to the `item-changed` event and handle changes yourself.",
); );
} else { } else {
throw e; throw e;
...@@ -286,12 +286,12 @@ export default { ...@@ -286,12 +286,12 @@ export default {
x: this.clamp( x: this.clamp(
1, 1,
Math.ceil((x - rect.x) / (rect.width / this.cols)), Math.ceil((x - rect.x) / (rect.width / this.cols)),
this.cols this.cols,
), ),
y: this.clamp( y: this.clamp(
1, 1,
Math.ceil((y - rect.y) / (rect.height / this.rows)), Math.ceil((y - rect.y) / (rect.height / this.rows)),
this.rows this.rows,
), ),
}; };
}, },
...@@ -326,7 +326,7 @@ export default { ...@@ -326,7 +326,7 @@ export default {
if (this.value.some((item) => item.w > 1)) { if (this.value.some((item) => item.w > 1)) {
console.warn( console.warn(
"You are using multipleItemsY but some items have a width greater than 1.", "You are using multipleItemsY but some items have a width greater than 1.",
"This is not supported and will lead to unexpected behaviour." "This is not supported and will lead to unexpected behaviour.",
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment