mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-17 09:10:08 +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;
|
margin-top: 1.7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mermaid svg {
|
.mermaid > svg {
|
||||||
|
border: 1px solid transparent;
|
||||||
|
cursor: pointer;
|
||||||
/* remove inline height from generated diagram */
|
/* remove inline height from generated diagram */
|
||||||
height: initial !important;
|
height: initial !important;
|
||||||
}
|
}
|
||||||
|
.mermaid > svg:hover {
|
||||||
|
border-color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.include.hide-first-heading h1:first-of-type,
|
.include.hide-first-heading h1:first-of-type,
|
||||||
.include.hide-first-heading h2:first-of-type,
|
.include.hide-first-heading h2:first-of-type,
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
// Generated by CoffeeScript 1.10.0
|
// 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)
|
Author: Daniel Hoffmann Bernardes (daniel.hoffmann.bernardes@gmail.com)
|
||||||
|
|
||||||
|
@ -579,9 +581,9 @@ Copyright (C) 2014 Daniel Hoffmann Bernardes, Ícaro Technologies
|
||||||
initialViewBox = $.extend({}, viewBox);
|
initialViewBox = $.extend({}, viewBox);
|
||||||
$body = $(window.document.body);
|
$body = $(window.document.body);
|
||||||
domBody = $body[0];
|
domBody = $body[0];
|
||||||
oldCursor = $body.css("cursor");
|
oldCursor = this.$svg.css("cursor");
|
||||||
if (this.events.dragCursor != null) {
|
if (this.events.dragCursor != null) {
|
||||||
$body.css("cursor", this.events.dragCursor);
|
this.$svg.css("cursor", this.events.dragCursor);
|
||||||
}
|
}
|
||||||
mouseMoveCallback = (function(ev2) {
|
mouseMoveCallback = (function(ev2) {
|
||||||
var currentMousePosition, initialMousePosition;
|
var currentMousePosition, initialMousePosition;
|
||||||
|
@ -607,7 +609,7 @@ Copyright (C) 2014 Daniel Hoffmann Bernardes, Ícaro Technologies
|
||||||
domBody.removeEventListener("touchcancel", mouseUpCallback, true);
|
domBody.removeEventListener("touchcancel", mouseUpCallback, true);
|
||||||
domBody.removeEventListener("mouseout", mouseUpCallback, true);
|
domBody.removeEventListener("mouseout", mouseUpCallback, true);
|
||||||
if (this.events.dragCursor != null) {
|
if (this.events.dragCursor != null) {
|
||||||
$body.css("cursor", oldCursor);
|
this.$svg.css("cursor", oldCursor);
|
||||||
}
|
}
|
||||||
dragStarted = false;
|
dragStarted = false;
|
||||||
}).bind(opts);
|
}).bind(opts);
|
||||||
|
|
Loading…
Add table
Reference in a new issue