aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-10-03 00:48:04 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2021-10-03 00:48:04 +0200
commit0ddb299f256a6be037a904b84c4b2cdcdffe18c0 (patch)
tree5e5551ed08a46ed56dabc59bd446821ec81f29f8 /static
parentto_jcal for new VEvent class. (diff)
downloadcalp-0ddb299f256a6be037a904b84c4b2cdcdffe18c0.tar.gz
calp-0ddb299f256a6be037a904b84c4b2cdcdffe18c0.tar.xz
Fix graphical block size.
Diffstat (limited to 'static')
-rw-r--r--static/globals.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/static/globals.js b/static/globals.js
index c414fc5b..6efba94f 100644
--- a/static/globals.js
+++ b/static/globals.js
@@ -324,6 +324,21 @@ class ComponentBlock extends ComponentVEvent {
constructor () {
super();
}
+
+ redraw (data) {
+ super.redraw(data);
+
+ let p;
+ if ((p = data.getProperty('dtstart'))) {
+ this.style.top = date_to_percent(p, 1) + "%";
+ console.log('dtstart', p);
+ }
+ if ((p = data.getProperty('dtend'))) {
+ this.style.height = 'unset';
+ console.log('dtend', p);
+ this.style.bottom = (100 - date_to_percent(p, 1)) + "%";
+ }
+ }
}
window.addEventListener('load', function () {