Commit 7129ffe7 by liuyong

修改画布

1 parent d92061af
...@@ -246,28 +246,18 @@ var backGraph = function (that, toolbarContainer) {//返回上级图形按钮 ...@@ -246,28 +246,18 @@ var backGraph = function (that, toolbarContainer) {//返回上级图形按钮
// Toggles compact mode // Toggles compact mode
mxEvent.addListener(this.toggleElement, 'click', mxUtils.bind(this, function (evt) { mxEvent.addListener(this.toggleElement, 'click', mxUtils.bind(this, function (evt) {
console.log('上级图形') console.log('上级图形');
// const mockFile = { const xml = localStorage.getItem('xmlData');
// 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"> const mockFile = {
// <root> data: xml,
// <mxCell id="0"/> title: '原始数据'
// <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"> that.editor.setStatus('');
// <mxGeometry x="110" y="130" width="170" height="85" as="geometry"/> that.fileLoaded(null);
// </mxCell> that.spinner.stop();
// <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"> const file = new LocalFile(that, mockFile.data, mockFile.title, null);
// <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);
// that.loadFile(`-3`, true, file); that.loadFile(`-3`, true, file);
})); }));
......
...@@ -8,25 +8,48 @@ function lookCurrentDetailsMenu(that, graph, menu, evt) {//添加下钻数据按 ...@@ -8,25 +8,48 @@ function lookCurrentDetailsMenu(that, graph, menu, evt) {//添加下钻数据按
function lookCurrentDetailsMenuAction(editorUi, graph) {//下钻数据按钮点击操作 function lookCurrentDetailsMenuAction(editorUi, graph) {//下钻数据按钮点击操作
editorUi.actions.addAction('lookCurrentDetails', function(evt) 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()) if (!graph.isSelectionEmpty())
// { {
// console.log('下钻数据') console.log('下钻数据')
// const mockFile = { 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"> 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> <root>
// <mxCell id="0"/> <mxCell id="0"/>
// <mxCell id="1" parent="0"/> <mxCell id="1" parent="0"/>
// </root> </root>
// </mxGraphModel>`, </mxGraphModel>`,
// title: '下钻数据' title: '下钻数据'
// } }
// editorUi.editor.setStatus(''); editorUi.editor.setStatus('');
// editorUi.fileLoaded(null); editorUi.fileLoaded(null);
// editorUi.spinner.stop(); editorUi.spinner.stop();
// const file = new LocalFile(editorUi, mockFile.data, mockFile.title, null); const file = new LocalFile(editorUi, mockFile.data, mockFile.title, null);
// editorUi.fileLoaded(file); 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 @@ ...@@ -10571,6 +10571,7 @@
const that = this; const that = this;
lookCurrentDetailsMenu(that, graph, menu, evt); lookCurrentDetailsMenu(that, graph, menu, evt);
propertyTransferMenu(that, graph, menu, evt);
if (graph.isSelectionEmpty() && Editor.currentTheme == 'simple') if (graph.isSelectionEmpty() && Editor.currentTheme == 'simple')
{ {
......
...@@ -3310,6 +3310,7 @@ ...@@ -3310,6 +3310,7 @@
}); });
lookCurrentDetailsMenuAction(editorUi, graph); lookCurrentDetailsMenuAction(editorUi, graph);
propertyTransferMenuAction(editorUi, graph);
editorUi.actions.addAction('accounts...', function() editorUi.actions.addAction('accounts...', function()
{ {
......
...@@ -485,6 +485,7 @@ links=Links ...@@ -485,6 +485,7 @@ links=Links
loading=Loading loading=Loading
lockUnlock=Lock/Unlock lockUnlock=Lock/Unlock
lookCurrentDetails=lookCurrentDetails lookCurrentDetails=lookCurrentDetails
propertyTransfer=propertyTransfer
loggedOut=Logged Out loggedOut=Logged Out
logIn=log in logIn=log in
loveIt=I love {1} loveIt=I love {1}
......
...@@ -485,6 +485,7 @@ links=连接 ...@@ -485,6 +485,7 @@ links=连接
loading=加载中 loading=加载中
lockUnlock=锁定 / 解锁 lockUnlock=锁定 / 解锁
lookCurrentDetails=下钻数据 lookCurrentDetails=下钻数据
propertyTransfer=属性传递
loggedOut=注销 loggedOut=注销
logIn=登录 logIn=登录
loveIt=我爱 {1} loveIt=我爱 {1}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!