mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Add zoom buttons for viewmode and editor
This commit is contained in:
parent
ff02978467
commit
a4225832db
@ -14,7 +14,6 @@ body {
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
position: fixed
|
||||
}
|
||||
|
||||
div#mindplot {
|
||||
@ -142,48 +141,47 @@ div.shareModalDialog {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
// TODO: Review position.
|
||||
div#bottom-logo {
|
||||
position: absolute;
|
||||
bottom: 220px;
|
||||
right: 0;
|
||||
background: url(../images/logo-text-black.svg) no-repeat;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.popover {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
#zoom-button {
|
||||
height: 100px;
|
||||
width: 50px;
|
||||
border: 0;
|
||||
#floating-panel {
|
||||
position: absolute;
|
||||
bottom: 100px;
|
||||
right:10px;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
#bottom-logo {
|
||||
background: url(../images/logo-text-black.svg) no-repeat;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#zoom-button {
|
||||
width: 40px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#zoom-plus,
|
||||
#zoom-minus {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 40px 40px;
|
||||
background-position: center;
|
||||
cursor: pointer;
|
||||
background-color: lightgray;
|
||||
z-index: 1000;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
#zoom-plus {
|
||||
border-radius: 8px 8px 0 0;
|
||||
background-image: url('../images/add-icon.svg')
|
||||
}
|
||||
|
||||
#zoom-minus {
|
||||
border-radius: 0 0 8px 8px;
|
||||
background-image: url('../images/minus-icon.svg')
|
||||
}
|
@ -23,4 +23,8 @@ div#footer-desc {
|
||||
div#footer-logo {
|
||||
float: left;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
#floating-panel {
|
||||
bottom: 80px;
|
||||
}
|
@ -87,14 +87,16 @@
|
||||
<div id="headerNotifier"></div>
|
||||
</div>
|
||||
<div id="mindplot" onselectstart="return false;"></div>
|
||||
<div id="bottom-logo"></div>
|
||||
<div id="zoom-button">
|
||||
<button id="zoom-plus">
|
||||
<img src="images/add-icon.svg" />
|
||||
</button>
|
||||
<button id="zoom-minus">
|
||||
<img src="images/minus-icon.svg" />
|
||||
</button>
|
||||
<div id="floating-panel">
|
||||
<div id="zoom-button">
|
||||
<button id="zoom-plus">
|
||||
<img src="images/add-icon.svg" />
|
||||
</button>
|
||||
<button id="zoom-minus">
|
||||
<img src="images/minus-icon.svg" />
|
||||
</button>
|
||||
</div>
|
||||
<div id="bottom-logo"></div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
@ -12,7 +12,18 @@
|
||||
<body>
|
||||
<div id="mindplot" onselectstart="return false;"></div>
|
||||
|
||||
|
||||
<div id="floating-panel">
|
||||
<div id="zoom-button">
|
||||
<button id="zoom-plus">
|
||||
<img src="images/add-icon.svg" />
|
||||
</button>
|
||||
<button id="zoom-minus">
|
||||
<img src="images/minus-icon.svg" />
|
||||
</button>
|
||||
</div>
|
||||
<div id="bottom-logo"></div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div id="footer-logo"><img src="../images/logo-small.svg" /></div>
|
||||
<div id="footer-desc">
|
||||
|
@ -15,6 +15,20 @@ designer.addEvent('loadSuccess', () => {
|
||||
document.getElementById('mindplot').classList.add('ready');
|
||||
});
|
||||
|
||||
const zoomInButton = document.getElementById('zoom-plus');
|
||||
const zoomOutButton = document.getElementById('zoom-minus');
|
||||
|
||||
if (zoomInButton) {
|
||||
zoomInButton.addEventListener('click', () => {
|
||||
designer.zoomIn();
|
||||
});
|
||||
}
|
||||
if (zoomOutButton) {
|
||||
zoomOutButton.addEventListener('click', () => {
|
||||
designer.zoomOut();
|
||||
});
|
||||
}
|
||||
|
||||
// Load map from XML file persisted on disk...
|
||||
const mapId = 'welcome';
|
||||
const persistence = PersistenceManager.getInstance();
|
||||
|
@ -14,6 +14,20 @@ designer.addEvent('loadSuccess', () => {
|
||||
document.getElementById('mindplot').classList.add('ready');
|
||||
});
|
||||
|
||||
const zoomInButton = document.getElementById('zoom-plus');
|
||||
const zoomOutButton = document.getElementById('zoom-minus');
|
||||
|
||||
if (zoomInButton) {
|
||||
zoomInButton.addEventListener('click', () => {
|
||||
designer.zoomIn();
|
||||
});
|
||||
}
|
||||
if (zoomOutButton) {
|
||||
zoomOutButton.addEventListener('click', () => {
|
||||
designer.zoomOut();
|
||||
});
|
||||
}
|
||||
|
||||
// Load map from XML file persisted on disk...
|
||||
const persistence = PersistenceManager.getInstance();
|
||||
const mindmap = persistence.load(mapId);
|
||||
|
Loading…
Reference in New Issue
Block a user