mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
mermaid: let zoom reset to initial size #145
This commit is contained in:
parent
de1cfc1a2d
commit
ec7dc9d042
1 changed files with 5 additions and 4 deletions
|
@ -5,6 +5,7 @@ Base: jQuery SVG Pan Zoom v1.0.3, October 2015 (labeled v1.0.2, June 2015)
|
||||||
McShelby.hugo-theme-relearn:
|
McShelby.hugo-theme-relearn:
|
||||||
Change 1: OnMouseUp restore image cursor (not document cursor)
|
Change 1: OnMouseUp restore image cursor (not document cursor)
|
||||||
Change 2: add PR #18
|
Change 2: add PR #18
|
||||||
|
Change 3: remove default limits enlargement of 15% as image can not be restored to initial size by zooming out only
|
||||||
|
|
||||||
|
|
||||||
Author: Daniel Hoffmann Bernardes (daniel.hoffmann.bernardes@gmail.com)
|
Author: Daniel Hoffmann Bernardes (daniel.hoffmann.bernardes@gmail.com)
|
||||||
|
@ -370,10 +371,10 @@ Copyright (C) 2014 Daniel Hoffmann Bernardes, Ícaro Technologies
|
||||||
horizontalSizeIncrement = viewBox.width * 0.15;
|
horizontalSizeIncrement = viewBox.width * 0.15;
|
||||||
verticalSizeIncrement = viewBox.height * 0.15;
|
verticalSizeIncrement = viewBox.height * 0.15;
|
||||||
opts.limits = {
|
opts.limits = {
|
||||||
x: viewBox.x - horizontalSizeIncrement,
|
x: viewBox.x,
|
||||||
y: viewBox.y - verticalSizeIncrement,
|
y: viewBox.y,
|
||||||
x2: viewBox.x + viewBox.width + horizontalSizeIncrement,
|
x2: viewBox.x + viewBox.width,
|
||||||
y2: viewBox.y + viewBox.height + verticalSizeIncrement
|
y2: viewBox.y + viewBox.height
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
opts.reset = function() {
|
opts.reset = function() {
|
||||||
|
|
Loading…
Reference in a new issue