mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Move css to editor
This commit is contained in:
parent
619f4274cb
commit
c95b5c5a50
@ -25,7 +25,6 @@
|
||||
<li><a href="/viewmode.html">View mode:</a> Simple integration to load and render mindaps in read
|
||||
only mode</li>
|
||||
<li><a href="/editor.html">Editor mode:</a> Example on how mindplot can be used for mindmap edition. Browser local storage is used for persistance.</li>
|
||||
<li><a href="/container.html">Embedded:</a> Example on how to embeded editor in a iframe.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,190 +0,0 @@
|
||||
html {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body,
|
||||
div,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
ul,
|
||||
ol,
|
||||
li,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
pre,
|
||||
form,
|
||||
fieldset,
|
||||
input,
|
||||
textarea,
|
||||
p,
|
||||
blockquote,
|
||||
th,
|
||||
td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
fieldset,
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
address,
|
||||
caption,
|
||||
cite,
|
||||
code,
|
||||
dfn,
|
||||
em,
|
||||
strong,
|
||||
th,
|
||||
var {
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
caption,
|
||||
th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: 100%;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
q:before,
|
||||
q:after {
|
||||
content: '';
|
||||
}
|
||||
|
||||
abbr,
|
||||
acronym {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Percents could work for IE, but for backCompat purposes, we are using keywords.
|
||||
* x-small is for IE6/7 quirks mode.
|
||||
*
|
||||
*/
|
||||
body {
|
||||
font-size: 13px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: small;
|
||||
font: x-small;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: inherit;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* 99% for safari; 100% is too large
|
||||
*/
|
||||
select,
|
||||
input,
|
||||
textarea {
|
||||
font: 99% arial, helvetica, clean, sans-serif;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bump up !IE to get to 13px equivalent
|
||||
*/
|
||||
pre,
|
||||
code {
|
||||
font: 115% monospace;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default line-height based on font-size rather than "computed-value"
|
||||
* see: http://www.w3.org/TR/CSS21/visudet.html#line-height
|
||||
*/
|
||||
|
||||
body * {
|
||||
line-height: 1.22em;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
form {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:active {
|
||||
font: bold 100%;
|
||||
text-decoration: underline;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 160%;
|
||||
color: #8e9181;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-style: normal;
|
||||
font-size: 180%;
|
||||
color: white;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
/* use as subhead on main body */
|
||||
clear: left;
|
||||
font-style: normal;
|
||||
font-size: 130%;
|
||||
color: #6b6f5b;
|
||||
}
|
||||
|
||||
h4 {
|
||||
/* use as headers in footer */
|
||||
font-weight: bold;
|
||||
font-size: 120%;
|
||||
border-bottom: 1px solid #8e9181;
|
||||
color: #e2e3dd;
|
||||
padding-bottom: 10px;
|
||||
width: 400px;
|
||||
}
|
@ -1,208 +0,0 @@
|
||||
@import "compatibility.css";
|
||||
|
||||
/********************************************************************************/
|
||||
/* Header & Toolbar Styles */
|
||||
/********************************************************************************/
|
||||
@import "header.css";
|
||||
@import "../bootstrap/css/bootstrap.min.css";
|
||||
|
||||
body {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div#mindplot {
|
||||
position: relative;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
overflow: hidden;
|
||||
opacity: 1;
|
||||
background-color: #f2f2f2;
|
||||
background-image: linear-gradient(#ebe9e7 1px, transparent 1px), linear-gradient(to right, #ebe9e7 1px, #f2f2f2 1px);
|
||||
background-size: 50px 50px;
|
||||
}
|
||||
|
||||
.notesTip {
|
||||
background-color: #dfcf3c;
|
||||
padding: 5px 15px;
|
||||
color: #666666;
|
||||
/*font-weight: bold;*/
|
||||
/*width: 100px;*/
|
||||
font-size: 13px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.linkTip {
|
||||
background-color: #dfcf3c;
|
||||
padding: 5px 15px;
|
||||
color: #666666;
|
||||
/*font-weight: bold;*/
|
||||
/*width: 100px;*/
|
||||
font-size: 13px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.keyboardShortcutTip {
|
||||
background-color: black;
|
||||
padding: 5px 15px;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/** */
|
||||
/* Modal dialogs definitions */
|
||||
|
||||
div.modalDialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
z-index: 11000;
|
||||
width: 500px;
|
||||
margin: -250px 0 0 -250px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #999;
|
||||
padding: 10px;
|
||||
overflow: auto;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
div.modalDialog .content {
|
||||
padding: 5px 5px;
|
||||
}
|
||||
|
||||
div.modalDialog .title {
|
||||
font-weight: bold;
|
||||
text-shadow: 1px 1px 0 #fff;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 5px 15px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/*--- End Modal Dialog Form ---*/
|
||||
|
||||
.publishModalDialog .content {
|
||||
height: 420px;
|
||||
}
|
||||
|
||||
.exportModalDialog .content {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.shareModalDialog .content {
|
||||
height: 440px;
|
||||
}
|
||||
|
||||
div.shareModalDialog {
|
||||
width: 550px;
|
||||
}
|
||||
|
||||
.panelIcon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-left: 4px;
|
||||
margin-top: 3px;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.panelIcon:hover {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.popover {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
#floating-panel {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
div#position {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#position-button {
|
||||
cursor: pointer;
|
||||
border: solid black 1px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 40px 40px;
|
||||
background-color: #FFF;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
#zoom-button {
|
||||
width: 40px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#zoom-plus,
|
||||
#zoom-minus {
|
||||
border: solid black 1px;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 40px 40px;
|
||||
background-position: center;
|
||||
cursor: pointer;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
#zoom-plus {
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
|
||||
#zoom-minus {
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
div#shotcuts > img{
|
||||
margin: 20px 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
#keyboardTable {
|
||||
font-family: Arial, verdana, serif;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#keyboardTable td {
|
||||
padding: 3px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#keyboardTable th {
|
||||
padding: 5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#keyboardTable th {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
@import "editor.css";
|
||||
|
||||
/* Overwrite some styles */
|
||||
body {
|
||||
position: inherit;
|
||||
}
|
||||
|
||||
div#headerInfo {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
div#header {
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
div#headerMapTitle,
|
||||
#headerActions,
|
||||
#headerLogo {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Footer Styles */
|
||||
div#footer {
|
||||
position: absolute;
|
||||
height: 0px;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
div#zoomIn {
|
||||
background: url(../images/zoom-in.png) no-repeat left top;
|
||||
margin-top: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#zoomOut {
|
||||
background: url(../images/zoom-out.png) no-repeat left top;
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.button {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
border: 1px solid black;
|
||||
border-top-color: white;
|
||||
border-left-color: white;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div#mapDetails {
|
||||
float: right;
|
||||
padding-top: 10px;
|
||||
margin-right: 130px;
|
||||
|
||||
}
|
||||
|
||||
div#mapDetails .title {
|
||||
font-weight: bold;
|
||||
margin-left: 10px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
div#infoPanel {
|
||||
border: 2px black solid;
|
||||
position: absolute;
|
||||
background: gray;
|
||||
width: 100px;
|
||||
height: 300px;
|
||||
z-index: 100;
|
||||
padding: 5px;
|
||||
border-radius: 8px;
|
||||
top: 150px;
|
||||
right: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div#infoPanel .textNode {
|
||||
background-color: #E0E5EF;
|
||||
height: 20px;
|
||||
width: 80px;
|
||||
border: 3px #023BB9 solid;
|
||||
padding: 4px;
|
||||
cursor: move
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
@import "toolbar.css";
|
||||
|
||||
|
||||
#accountSettingsPanel{
|
||||
padding:10px 10px;
|
||||
}
|
@ -1,164 +0,0 @@
|
||||
div#toolbar {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
|
||||
background-color: #fff;
|
||||
min-width: 900px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div#toolbar .buttonContainer {
|
||||
height: 50px;
|
||||
padding-top: 8px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
float: left;
|
||||
border-left: 1px solid lightgray;
|
||||
}
|
||||
|
||||
div#mapName >span {
|
||||
border-radius: 4px;
|
||||
float: left;
|
||||
padding: 8px;
|
||||
min-width: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div#backToList {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
float: left;
|
||||
margin: 13px 20px;
|
||||
}
|
||||
|
||||
/******************************************************************************************/
|
||||
/* Buttons*/
|
||||
/******************************************************************************************/
|
||||
|
||||
div#toolbar .buttonOn,
|
||||
div#toolbar .buttonOff,
|
||||
div#toolbar .buttonActive,
|
||||
div#toolbar .buttonOn:hover {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
z-index: 4;
|
||||
margin-top: 3px;
|
||||
padding-top: 2px;
|
||||
padding-left: 2px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
div#toolbar .buttonOn:hover {
|
||||
cursor: pointer;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
div#toolbar .buttonOn {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
div#toolbar .buttonOff {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
div#exportAnchor {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
div#toolbar .buttonExtOn,
|
||||
div#toolbar .buttonExtOff,
|
||||
div#toolbar .buttonExtActive,
|
||||
div#toolbar .buttonExtOn:hover {
|
||||
width: 40px;
|
||||
height: 28px;
|
||||
float: left;
|
||||
text-align: left;
|
||||
z-index: 4;
|
||||
margin-top: 3px;
|
||||
padding-top: 2px;
|
||||
padding-left: 5px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
div#toolbar .buttonExtOn:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
div#toolbar .buttonExtActive {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
div#toolbar .buttonExtOn {
|
||||
opacity: 0.8;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
div#toolbar .buttonExtOff {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
div#exportAnchor {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/***************************************************************************************************/
|
||||
/* Other toolbar styles */
|
||||
/***************************************************************************************************/
|
||||
.toolbarTip {
|
||||
background-color: #000000;
|
||||
padding: 5px 5px;
|
||||
color: #f5f5f5;
|
||||
/*font-weight: bold;*/
|
||||
/*width: 100px;*/
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
div#colorPalette {
|
||||
border: 1px solid #bbb4d6;
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
width: 160px;
|
||||
top: 89px;
|
||||
}
|
||||
|
||||
div.toolbarPanelLink,
|
||||
div.toolbarPanelLinkSelectedLink {
|
||||
cursor: pointer;
|
||||
color: black;
|
||||
margin: 1px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
padding: 5px 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.toolbarPanelLink:hover,
|
||||
div.toolbarPanelLinkSelectedLink {
|
||||
cursor: pointer;
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.toolbarPaneTip {
|
||||
background-color: rgb(228, 226, 210);
|
||||
padding: 5px 5px;
|
||||
color: #f5f5f5;
|
||||
/*font-weight: bold;*/
|
||||
/*width: 100px;*/
|
||||
font-size: 11px;
|
||||
-moz-border-radius: 60px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.2);
|
||||
border: 3px double rgb(190, 190, 190);
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
@import "editor.css";
|
||||
|
||||
/* Overwrite some styles */
|
||||
body {
|
||||
position: inherit;
|
||||
@ -32,4 +30,8 @@ div#footer-logo {
|
||||
|
||||
div#mindplot {
|
||||
top:0;
|
||||
}
|
||||
|
||||
#toolbar {
|
||||
display: none;
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>WiseMapping - Embedded Sample </title>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, Tahoma;
|
||||
background: #a9a9a9;
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#editor {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
#code {
|
||||
border: 1px dashed #f5f5dc;
|
||||
padding: 10px;
|
||||
background: #838383;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div id="doc">
|
||||
<h1>Embedded editor sample</h1>
|
||||
|
||||
<p>
|
||||
This is a simple example of how WiseMapping can be embedded in a page.
|
||||
Embedding WiseMapping editor is such simple as copying this line in your page:
|
||||
</p>
|
||||
<div id="code"><iframe src="embedded.html?confUrl=html/container.json" width="800" height="600"></iframe></div>
|
||||
<p>
|
||||
The container.json file contains a set of properties that must be configured. Properties:
|
||||
</p>
|
||||
<ul>
|
||||
<li>size: Must match with the size of the iframe</li>
|
||||
<li>zoom: Scale to be applied to the map</li>
|
||||
<li>readOnly: If the map could be modified.</li>
|
||||
<li>persistenceManager: Persistence managers to be used. By default, local browser storage is used.</li>
|
||||
<li>mapId: UUID of the map to be loaded.</li>
|
||||
<li>container: div element where the mindmap will be embedded..</li>
|
||||
|
||||
</ul>
|
||||
<p>
|
||||
It's important to point out that embedded.html is a static html page that it's mean to be a template page
|
||||
for advanced customization. In few words, go ahead and modify it.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div id="editor">
|
||||
<iframe src="embedded.html?confUrl=html/container.json" width="800" height="400"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
"readOnly":false,
|
||||
"zoom":1.3,
|
||||
"size":{
|
||||
"width":800,
|
||||
"height":400
|
||||
},
|
||||
"viewPort":
|
||||
{
|
||||
"width":800,
|
||||
"height":400
|
||||
},
|
||||
"persistenceManager": "mindplot.LocalStorageManager",
|
||||
"mapId": "welcome",
|
||||
"container":"mindplot",
|
||||
"locale": "en"
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>WiseMapping - Editor </title>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
|
||||
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root" onselectstart="return false;"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,4 +1,3 @@
|
||||
import '../css/editor.css';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import Editor from '../../../../src/index';
|
||||
|
@ -1,35 +0,0 @@
|
||||
import '../css/embedded.css';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import Editor from '../../../../src/index';
|
||||
import { buildDesigner, LocalStorageManager, PersistenceManager, DesignerOptionsBuilder } from '@wisemapping/mindplot';
|
||||
|
||||
|
||||
const initialization = () => {
|
||||
// Options has been defined in by a external file ?
|
||||
const p = new LocalStorageManager('samples/{id}.wxml');
|
||||
const options = DesignerOptionsBuilder.buildOptions({ persistenceManager: p });
|
||||
const designer = buildDesigner(options);
|
||||
|
||||
designer.addEvent('loadSuccess', () => {
|
||||
document.getElementById('mindplot').classList.add('ready');
|
||||
});
|
||||
|
||||
// Load map from XML file persisted on disk...
|
||||
const mapId = 'welcome';
|
||||
const persistence = PersistenceManager.getInstance();
|
||||
const mindmap = persistence.load(mapId);
|
||||
designer.loadMap(mindmap);
|
||||
};
|
||||
|
||||
ReactDOM.render(
|
||||
<Editor
|
||||
mapId={global.mapId}
|
||||
memoryPersistence={global.memoryPersistence}
|
||||
readOnlyMode={global.readOnly}
|
||||
locale={global.locale}
|
||||
onAction={(action) => console.log('action called:', action)}
|
||||
initCallback={initialization}
|
||||
/>,
|
||||
document.getElementById('root')
|
||||
);
|
@ -9,7 +9,6 @@ const playgroundConfig = {
|
||||
mode: 'development',
|
||||
entry: {
|
||||
viewmode: path.resolve(__dirname, './test/playground/map-render/js/viewmode'),
|
||||
embedded: path.resolve(__dirname, './test/playground/map-render/js/embedded'),
|
||||
editor: path.resolve(__dirname, './test/playground/map-render/js/editor'),
|
||||
},
|
||||
output: {
|
||||
@ -24,17 +23,6 @@ const playgroundConfig = {
|
||||
port: 8081,
|
||||
open: false,
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: [
|
||||
'style-loader',
|
||||
'css-loader?url=false',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin({
|
||||
dangerouslyAllowCleanPatternsOutsideProject: true,
|
||||
@ -46,10 +34,7 @@ const playgroundConfig = {
|
||||
{ from: 'test/playground/map-render/images', to: 'images' },
|
||||
{ from: 'test/playground/map-render/js', to: 'js' },
|
||||
{ from: 'test/playground/map-render/samples', to: 'samples' },
|
||||
{ from: '../../libraries/bootstrap', to: 'bootstrap' },
|
||||
{ from: 'test/playground/index.html', to: 'index.html' },
|
||||
{ from: 'test/playground/map-render/html/container.json', to: 'html/container.json' },
|
||||
{ from: 'test/playground/map-render/html/container.html', to: 'container.html' },
|
||||
],
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
@ -57,11 +42,6 @@ const playgroundConfig = {
|
||||
filename: 'viewmode.html',
|
||||
template: 'test/playground/map-render/html/viewmode.html',
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
chunks: ['embedded'],
|
||||
filename: 'embedded.html',
|
||||
template: 'test/playground/map-render/html/embedded.html',
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
chunks: ['editor'],
|
||||
filename: 'editor.html',
|
||||
|
Loading…
Reference in New Issue
Block a user