Commit 7129ffe7 by liuyong

修改画布

1 parent d92061af
......@@ -246,28 +246,18 @@ var backGraph = function (that, toolbarContainer) {//返回上级图形按钮
// Toggles compact mode
mxEvent.addListener(this.toggleElement, 'click', mxUtils.bind(this, function (evt) {
console.log('上级图形')
// const mockFile = {
// data: `<mxGraphModel dx="1273" dy="619" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
// <root>
// <mxCell id="0"/>
// <mxCell id="1" parent="0"/>
// <mxCell id="NuJ1xgI3z5VlG4THHdq2-1" value="" style="rounded=1;whiteSpace=wrap;html=1;container=1;collapsible=0;;fillColor=#4CD964;attr=[];eleId=5;eaLevel=1;" vertex="1" parent="1">
// <mxGeometry x="110" y="130" width="170" height="85" as="geometry"/>
// </mxCell>
// <mxCell id="NuJ1xgI3z5VlG4THHdq2-2" value="" style="rounded=1;whiteSpace=wrap;html=1;container=1;collapsible=0;;fillColor=#4CD964;attr=[];eleId=5;eaLevel=1;" vertex="1" parent="NuJ1xgI3z5VlG4THHdq2-1">
// <mxGeometry x="20" y="10" width="150" height="75" as="geometry"/>
// </mxCell>
// </root>
// </mxGraphModel>`,
// title: '原始数据'
// };
// that.editor.setStatus('');
// that.fileLoaded(null);
// that.spinner.stop();
// const file = new LocalFile(that, mockFile.data, mockFile.title, null);
console.log('上级图形');
const xml = localStorage.getItem('xmlData');
const mockFile = {
data: xml,
title: '原始数据'
};
that.editor.setStatus('');
that.fileLoaded(null);
that.spinner.stop();
const file = new LocalFile(that, mockFile.data, mockFile.title, null);
// that.loadFile(`-3`, true, file);
that.loadFile(`-3`, true, file);
}));
......
......@@ -8,25 +8,48 @@ function lookCurrentDetailsMenu(that, graph, menu, evt) {//添加下钻数据按
function lookCurrentDetailsMenuAction(editorUi, graph) {//下钻数据按钮点击操作
editorUi.actions.addAction('lookCurrentDetails', function(evt)
{
editorUi.spinner.spin(document.body, mxResources.get('loading'));
// editorUi.spinner.spin(document.body, mxResources.get('loading'));
// if (!graph.isSelectionEmpty())
// {
// console.log('下钻数据')
// const mockFile = {
// data: `<mxGraphModel dx="1177" dy="690" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
// <root>
// <mxCell id="0"/>
// <mxCell id="1" parent="0"/>
// </root>
// </mxGraphModel>`,
// title: '下钻数据'
// }
// editorUi.editor.setStatus('');
// editorUi.fileLoaded(null);
// editorUi.spinner.stop();
// const file = new LocalFile(editorUi, mockFile.data, mockFile.title, null);
// editorUi.fileLoaded(file);
// }
if (!graph.isSelectionEmpty())
{
console.log('下钻数据')
const mockFile = {
data: `<mxGraphModel dx="1177" dy="690" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
</root>
</mxGraphModel>`,
title: '下钻数据'
}
editorUi.editor.setStatus('');
editorUi.fileLoaded(null);
editorUi.spinner.stop();
const file = new LocalFile(editorUi, mockFile.data, mockFile.title, null);
editorUi.fileLoaded(file);
}
});
}
function propertyTransferMenu(that, graph, menu, evt) {//添加属性传递按钮
if (!graph.isSelectionEmpty())
{
that.addMenuItems(menu, ['-', 'propertyTransfer'], null, evt);
}
}
function propertyTransferMenuAction(editorUi, graph) {//属性传递按钮点击操作
editorUi.actions.addAction('propertyTransfer', function(evt)
{
if (!graph.isSelectionEmpty())
{
var cells = graph.getSelectionCells();
// graph.setCellStyles('property', '属性', [cells[0]]);//设置style里面拼接属性
// var style = graph.getCurrentCellStyle(cells[0]);
// console.log(cells);
// console.log(style);
}
});
}
\ No newline at end of file
......@@ -10571,6 +10571,7 @@
const that = this;
lookCurrentDetailsMenu(that, graph, menu, evt);
propertyTransferMenu(that, graph, menu, evt);
if (graph.isSelectionEmpty() && Editor.currentTheme == 'simple')
{
......
......@@ -3310,6 +3310,7 @@
});
lookCurrentDetailsMenuAction(editorUi, graph);
propertyTransferMenuAction(editorUi, graph);
editorUi.actions.addAction('accounts...', function()
{
......
......@@ -485,6 +485,7 @@ links=Links
loading=Loading
lockUnlock=Lock/Unlock
lookCurrentDetails=lookCurrentDetails
propertyTransfer=propertyTransfer
loggedOut=Logged Out
logIn=log in
loveIt=I love {1}
......
......@@ -485,6 +485,7 @@ links=连接
loading=加载中
lockUnlock=锁定 / 解锁
lookCurrentDetails=下钻数据
propertyTransfer=属性传递
loggedOut=注销
logIn=登录
loveIt=我爱 {1}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!