mermaid: add visual hints for pan/zoom #143

This commit is contained in:
Sören Weber 2021-11-09 21:07:22 +01:00
parent abfe838db2
commit d673f413be
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
2 changed files with 13 additions and 5 deletions

View file

@ -1074,10 +1074,16 @@ option {
margin-top: 1.7rem;
}
.mermaid svg {
.mermaid > svg {
border: 1px solid transparent;
cursor: pointer;
/* remove inline height from generated diagram */
height: initial !important;
}
.mermaid > svg:hover {
border-color: #ccc;
}
.include.hide-first-heading h1:first-of-type,
.include.hide-first-heading h2:first-of-type,

View file

@ -1,7 +1,9 @@
// Generated by CoffeeScript 1.10.0
/*
jQuery SVG Pan Zoom v1.0.2, June 2015
Base: jQuery SVG Pan Zoom v1.0.3, October 2015 (labeled v1.0.2, June 2015)
McShelby.hugo-theme-relearn:
Change 1: OnMouseUp restore image cursor (not document cursor)
Author: Daniel Hoffmann Bernardes (daniel.hoffmann.bernardes@gmail.com)
@ -579,9 +581,9 @@ Copyright (C) 2014 Daniel Hoffmann Bernardes, Ícaro Technologies
initialViewBox = $.extend({}, viewBox);
$body = $(window.document.body);
domBody = $body[0];
oldCursor = $body.css("cursor");
oldCursor = this.$svg.css("cursor");
if (this.events.dragCursor != null) {
$body.css("cursor", this.events.dragCursor);
this.$svg.css("cursor", this.events.dragCursor);
}
mouseMoveCallback = (function(ev2) {
var currentMousePosition, initialMousePosition;
@ -607,7 +609,7 @@ Copyright (C) 2014 Daniel Hoffmann Bernardes, Ícaro Technologies
domBody.removeEventListener("touchcancel", mouseUpCallback, true);
domBody.removeEventListener("mouseout", mouseUpCallback, true);
if (this.events.dragCursor != null) {
$body.css("cursor", oldCursor);
this.$svg.css("cursor", oldCursor);
}
dragStarted = false;
}).bind(opts);