Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package zoom out state #14507

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 31 additions & 22 deletions src/DynamoCoreWpf/ViewModels/Core/NodeViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
using Dynamo.Configuration;
using Dynamo.Engine.CodeGeneration;
using Dynamo.Graph;
Expand All @@ -18,9 +7,19 @@
using Dynamo.Logging;
using Dynamo.Models;
using Dynamo.Selection;
using Dynamo.UI;
using Dynamo.Wpf.ViewModels.Core;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
using Point = System.Windows.Point;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using Size = System.Windows.Size;

Expand Down Expand Up @@ -1349,7 +1348,7 @@ internal SolidColorBrush GetBorderColor()

/*
Priorities seem to be:
Error > Warning > Info ; Frozen > Preview > None
Error > Warning > Info ; Frozen > Package > Preview > None
Pass through all possible states in reverse order
to assign icon values for each possible scenario
*/
Expand All @@ -1358,14 +1357,6 @@ Pass through all possible states in reverse order

if (this.NodeModel == null) return result;

if (this.NodeModel.IsCustomFunction)
{
result = nodeCustomColor;
if(result != null)
{
ImgGlyphOneSource = packageGlyph;
}
}
if (!this.IsVisible)
{
result = nodePreviewColor;
Expand All @@ -1374,6 +1365,24 @@ Pass through all possible states in reverse order
ImgGlyphOneSource = previewGlyph;
}
}

if (this.NodeModel.IsCustomFunction)
{
result = nodeCustomColor;
if(result != null)
{
if (ImgGlyphOneSource == null)
{
ImgGlyphOneSource = packageGlyph;
}
else
{
ImgGlyphOneSource = packageGlyph;
ImgGlyphTwoSource = previewGlyph;
}
}
}

if (this.IsFrozen)
{
result = nodeFrozenOverlayColor;
Expand All @@ -1382,7 +1391,7 @@ Pass through all possible states in reverse order
if (ImgGlyphOneSource == null)
{
ImgGlyphOneSource = frozenGlyph;
}
}
else
{
ImgGlyphOneSource = frozenGlyph;
Expand Down
Loading