mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
mermaid: add visual hints for pan/zoom #143
This commit is contained in:
parent
abfe838db2
commit
d673f413be
2 changed files with 13 additions and 5 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue