From 01d0dd3b1dd0a3c9764e7c9d31eab739db2d3ad8 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sun, 19 Jun 2022 09:26:25 +0300 Subject: [PATCH] Resizeable size of list width and height. Size is not saved yet. In Progress. Thanks to NLBlackEagle and xet7 ! Related #4558 --- client/components/lists/list.css | 5 +++-- client/components/swimlanes/swimlanes.js | 2 ++ models/lists.js | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/client/components/lists/list.css b/client/components/lists/list.css index 2988da7e4..6cb03cab1 100644 --- a/client/components/lists/list.css +++ b/client/components/lists/list.css @@ -7,8 +7,9 @@ border-left: 1px solid #ccc; padding: 0; float: left; - min-width: 270px; - max-width: 270px; + width: 270px; /* Orinal width: 270px. Changes not saved yet: */ + resize: both; /* - List width and height resizeable */ + overflow: auto; /* - List width and height resizeable */ } .list:first-child { margin-left: 5px; diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js index 59d3c231c..fca807d8a 100644 --- a/client/components/swimlanes/swimlanes.js +++ b/client/components/swimlanes/swimlanes.js @@ -80,6 +80,8 @@ function initSortable(boardComponent, $listsDom) { Lists.update(list._id, { $set: { sort: sortIndex.base, + width: list._id.width(), + height: list._id.height(), }, }); diff --git a/models/lists.js b/models/lists.js index 80e0914dc..09be14248 100644 --- a/models/lists.js +++ b/models/lists.js @@ -79,6 +79,21 @@ Lists.attachSchema( // XXX We should probably provide a default optional: true, }, + width: { + /** + * list width, default 270px + */ + type: String, + defaultValue: '270px', + optional: true, + }, + height: { + /** + * list height + */ + type: String, + optional: true, + }, updatedAt: { /** * last update of the list