From 3521d13cf6fd669f5392ab97c49a88a388c8b43b Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Mon, 6 Sep 2021 14:49:43 +0100 Subject: [PATCH] jsonnetfmt Signed-off-by: Tom Wilkie --- grafonnet-7.0/layout.libsonnet | 62 +++++++++++++++++----------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/grafonnet-7.0/layout.libsonnet b/grafonnet-7.0/layout.libsonnet index af174ef2..ee49650c 100644 --- a/grafonnet-7.0/layout.libsonnet +++ b/grafonnet-7.0/layout.libsonnet @@ -21,38 +21,38 @@ // .addPanel(...) { - // Track where the next panel should go using these private variables, aka "the cursor". - _cursor:: { - x: 0, - y: 0, - h: 0, - }, + // Track where the next panel should go using these private variables, aka "the cursor". + _cursor:: { + x: 0, + y: 0, + h: 0, + }, - // addPanels add a panel at the cursor and moves the cursor to the right by the panel width. - addPanel(panel):: - local cursor = self._cursor; - local panelWithPos = panel { - gridPos+: { - x: cursor.x, - y: cursor.y, - }, - }; - super.addPanel(panelWithPos) + { - _cursor+:: { - x+: panel.gridPos.w, - h: - if cursor.h > panel.gridPos.h - then cursor.h - else panel.gridPos.h, - }, - }, + // addPanels add a panel at the cursor and moves the cursor to the right by the panel width. + addPanel(panel):: + local cursor = self._cursor; + local panelWithPos = panel { + gridPos+: { + x: cursor.x, + y: cursor.y, + }, + }; + super.addPanel(panelWithPos) + { + _cursor+:: { + x+: panel.gridPos.w, + h: + if cursor.h > panel.gridPos.h + then cursor.h + else panel.gridPos.h, + }, + }, - // Start a new row beneath the current cursor. - nextRow():: self + { - _cursor+:: { - x: 0, - y+: super.h, - h: 0, - }, + // Start a new row beneath the current cursor. + nextRow():: self + { + _cursor+:: { + x: 0, + y+: super.h, + h: 0, }, + }, }