Skip to content

Commit

Permalink
chnage to circuit router
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcl committed Dec 12, 2020
1 parent 706f2f0 commit 419eff9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Renderer/Draw2dWrapper/draw2d_digital_connections.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ draw2d.policy.line.OrthogonalSelectionFeedbackPolicy = draw2d.policy.line.Orthog
})

/// Setup circuit-like connections in the diagram.
let router = new draw2d.layout.connection.InteractiveManhattanConnectionRouter();
//let router = new draw2d.layout.connection.CircuitConnectionRouter();
//let router = new draw2d.layout.connection.InteractiveManhattanConnectionRouter();
let router = new draw2d.layout.connection.CircuitConnectionRouter();
// TODO: use CircuitConnectionRouter instead?
router.abortRoutingOnFirstVertexNode = false;

Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/Interface/JSHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ let mutable debugLevel = 0
#endif

/// trace UI execution: "view" - mark view function. "update" print update messages.
let mutable debugTraceUI: string Set = Set ["view";"update"]
let mutable debugTraceUI: string Set = Set []

/// Call debugAction() and print its result if debugTraceUI mutable contains string traceCode
let traceIf traceCode debugAction =
Expand Down
8 changes: 7 additions & 1 deletion src/Renderer/UI/Update.fs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,14 @@ let private handleJSDiagramMsg msg model =
| InferWidths () ->
runBusWidthInference model
| SetHasUnsavedChanges s ->
let quicklyKnowItHasChanged comps1 comps2 =
match (comps1:Component list), (comps2:Component list) with
| {Id=id1;X=x1;Y=y1}::_, {Id=id2;X=x2;Y=y2}::_ when id1 = id2 && (x1 <> x2 || y1 <> y2)
-> true
| _ -> false
let isNotEquiv (comps1,conns1) (comps2,conns2) =
Set comps1 <> Set comps2 || Set conns1 <> Set conns2
quicklyKnowItHasChanged comps1 comps2 ||
Set comps1 <> Set comps2 || Set conns1 <> Set conns2
let nState = getDetailedState model
if s && isNotEquiv model.LastDetailedSavedState nState && not model.IsLoading then
//printfn "Setting Changed %A" s
Expand Down

0 comments on commit 419eff9

Please sign in to comment.