Fix svg saving.

This commit is contained in:
Oleg Sh
2024-10-11 19:33:03 +02:00
parent 1576a1c6e4
commit 6ea3935543
7 changed files with 9 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
moduleLoader.beginCacheLoading(["/script/shared/utils.js?v=87","/script/entities/graph/api/index.js?v=87","/script/shared/point.js?v=87","/script/entities/edge/api/index.js?v=87","/script/entities/edge/model/BaseEdge.js?v=87","/script/entities/edge/model/EdgeModel.js?v=87","/script/entities/vertex/api/index.js?v=87","/script/entities/vertex/model/BaseVertex.js?v=87","/script/entities/vertex/model/VertexModel.js?v=87","/script/entities/graph/model/Graph.js?v=87","/script/features/draw_graph/api/index.js?v=87","/script/features/draw_graph/model/BaseBackgroundDrawer.js?v=87","/script/features/draw_graph/model/EdgeStyle.js?v=87","/script/features/draw_graph/model/BaseEdgeDrawer.js?v=87","/script/features/draw_graph/model/VertexShape.js?v=87","/script/features/draw_graph/model/VertexStyle.js?v=87","/script/features/draw_graph/model/BaseVertexDrawer.js?v=87","/script/features/algorithms/api/index.js?v=87","/script/features/algorithms/model/Algorithms.js?v=87","/script/features/algorithms/model/BaseTraversal.js?v=87","/script/features/base_handler/index.js?v=87","/script/features/default_handler/index.js?v=87","/script/features/add_vertices_handler/index.js?v=87","/script/features/connect_vertices_handler/index.js?v=87","/script/features/delete_objects_handler/index.js?v=87","/script/features/algorithm_handler/index.js?v=87","/script/features/serialization/api/index.js?v=87","/script/features/serialization/model/GraphMLCreator.js?v=87","/script/features/enum_vertices/EnumVertices.js?v=87","/script/pages/editor/model/texts.js?v=87","/script/pages/editor/model/UndoStack.js?v=87","/script/pages/editor/model/DiskSaveLoad.js?v=87","/script/pages/editor/model/Application.js?v=87","/script/pages/editor/ui/ya_metrika.js?v=87","/script/pages/editor/ui/editor.js?v=87","/script/pages/editor/ui/main.js?v=87",]);{function onloadEditor(){console.log("onload() call");doIncludeAsync([include("shared/canvas2svg.js"),include("features/group_rename_handler/index.js"),include("features/saved_graph_handler/index.js"),include("features/saved_graph_image_handler/index.js"),include("features/show_adjacency_matrix/index.js"),include("features/show_distance_matrix/index.js"),include("features/show_incidence_matrix/index.js"),include("features/setup_background_style/index.js"),include("features/setup_edge_style/index.js"),include("features/setup_vertex_style/index.js"),]);postLoadPage();}
moduleLoader.beginCacheLoading(["/script/shared/utils.js?v=88","/script/entities/graph/api/index.js?v=88","/script/shared/point.js?v=88","/script/entities/edge/api/index.js?v=88","/script/entities/edge/model/BaseEdge.js?v=88","/script/entities/edge/model/EdgeModel.js?v=88","/script/entities/vertex/api/index.js?v=88","/script/entities/vertex/model/BaseVertex.js?v=88","/script/entities/vertex/model/VertexModel.js?v=88","/script/entities/graph/model/Graph.js?v=88","/script/features/draw_graph/api/index.js?v=88","/script/features/draw_graph/model/BaseBackgroundDrawer.js?v=88","/script/features/draw_graph/model/EdgeStyle.js?v=88","/script/features/draw_graph/model/BaseEdgeDrawer.js?v=88","/script/features/draw_graph/model/VertexShape.js?v=88","/script/features/draw_graph/model/VertexStyle.js?v=88","/script/features/draw_graph/model/BaseVertexDrawer.js?v=88","/script/features/algorithms/api/index.js?v=88","/script/features/algorithms/model/Algorithms.js?v=88","/script/features/algorithms/model/BaseTraversal.js?v=88","/script/features/base_handler/index.js?v=88","/script/features/default_handler/index.js?v=88","/script/features/add_vertices_handler/index.js?v=88","/script/features/connect_vertices_handler/index.js?v=88","/script/features/delete_objects_handler/index.js?v=88","/script/features/algorithm_handler/index.js?v=88","/script/features/serialization/api/index.js?v=88","/script/features/serialization/model/GraphMLCreator.js?v=88","/script/features/enum_vertices/EnumVertices.js?v=88","/script/pages/editor/model/texts.js?v=88","/script/pages/editor/model/UndoStack.js?v=88","/script/pages/editor/model/DiskSaveLoad.js?v=88","/script/pages/editor/model/Application.js?v=88","/script/pages/editor/ui/ya_metrika.js?v=88","/script/pages/editor/ui/editor.js?v=88","/script/pages/editor/ui/main.js?v=88",]);{function onloadEditor(){console.log("onload() call");doIncludeAsync([include("shared/canvas2svg.js"),include("features/group_rename_handler/index.js"),include("features/saved_graph_handler/index.js"),include("features/saved_graph_image_handler/index.js"),include("features/show_adjacency_matrix/index.js"),include("features/show_distance_matrix/index.js"),include("features/show_incidence_matrix/index.js"),include("features/setup_background_style/index.js"),include("features/setup_edge_style/index.js"),include("features/setup_vertex_style/index.js"),]);postLoadPage();}
let modulDir="pages/editor/";doInclude([include("shared/utils.js"),include("entities/graph/api/index.js"),include("features/draw_graph/api/index.js"),include("features/algorithms/api/index.js"),include("features/base_handler/index.js"),include("features/default_handler/index.js"),include("features/add_vertices_handler/index.js"),include("features/connect_vertices_handler/index.js"),include("features/delete_objects_handler/index.js"),include("features/algorithm_handler/index.js"),include("features/serialization/api/index.js"),include("features/enum_vertices/EnumVertices.js"),include("model/texts.js",modulDir),include("model/UndoStack.js",modulDir),include("model/DiskSaveLoad.js",modulDir),include("model/Application.js",modulDir),include("ui/ya_metrika.js",modulDir),include("ui/editor.js",modulDir),include("ui/main.js",modulDir)],onloadEditor);}
function gEncodeToHTML(str)
{if(typeof str!=='string')
@@ -1366,7 +1366,7 @@ UndoStack.prototype.IsUndoStackEmpty=function()
var DiskSaveLoad=function(){};DiskSaveLoad.LoadGraphFromDisk=function(graphName,callback)
{$.ajax({type:"GET",url:"/"+SiteDir+"backend/loadGraph.php?name="+graphName}).done(callback);}
DiskSaveLoad.SaveSVGGraphOnDisk=function(imageName,svgText,callback)
{$.ajax({type:"POST",url:"/"+SiteDir+"backend/saveSvg.php?name="+imageName,data:{svgdata:svgText},dataType:"text",success:callback});return imageName;}
{$.ajax({type:"POST",url:"/"+SiteDir+"backend/saveSvg.php?name="+imageName,data:svgText,dataType:"text",contentType:"text/xml; charset=utf-8",success:callback});return imageName;}
DiskSaveLoad.SaveGraphOnDisk=function(savedGraphName,graphAsString,callback)
{$.ajax({type:"POST",url:"/"+SiteDir+"backend/saveGraph.php?name="+savedGraphName,data:graphAsString,dataType:"text"}).done(callback);}
DiskSaveLoad.SaveGraphImageOnDisk=function(imageName,rectParams,imageBase64Data,callback)