Skip to content

Commit

Permalink
+ Version 2.3.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
panthernet committed Jan 13, 2016
1 parent 4686030 commit 59bae38
Show file tree
Hide file tree
Showing 15 changed files with 534 additions and 202 deletions.
4 changes: 2 additions & 2 deletions Documents/AIV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("2.3.0.0")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: AssemblyVersion("2.3.1.0")]
[assembly: AssemblyFileVersion("2.3.1.0")]
12 changes: 10 additions & 2 deletions Documents/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
WIP 2.3.1
RELEASE 2.3.1
DETAILED CHANGELOG:
- Added default templates for attached vertex and edge labels
- Added HighlightBehavior::HighlightedEdgeType attached property that indicates In or Out edge is currently highlighted. Default value is None.
- Added GraphArea::GetRelatedVertexControls() and GraphArea::GetRelatedEdgeControls() methods to fetch corresponding objects faster and easily
- Added new printing logic. Now you can use GraphArea::PrintDialog() and GraphArea::PrintVisibleAreaDialog() methods with extended optional parameters
- Added new image export logic. Now GraphArea::ExportToImage() method allows graph image export in original size via optional parameter
- Added GraphArea::SetPrintMode() method which is used internally by print and image export methods but can be useful to override due to complex GraphArea print preparation logic.
- Fixed excessive rendering issue when ZoomControl viewfinder is hidden. Should significantly increase performance of the viewfinder in this case.
- Fixed showcase app edge example graph
- Fixed ZoomControl viewbox logic to correctly react on zoom control background change
- Improved attachable labels logic. Simplified base classes, added checks for mandatory base classes
- Improved attachable labels customization possibilities by making several methods virtual

BREAKING CHANGES:
- Made DefaultLabelFactory class abstract and it is now accepts only one generic param (output object type)
- GraphAreaBase now has new abstract members needed to be overriden in derived controls: GetRelatedVertexControls(), GetRelatedEdgeControls(), SetPrintMode()


KNOWN ISSUES:
- Graph image export may throw OutOfMemoryError for large graphs


RELEASE 2.3.0
Expand Down
10 changes: 5 additions & 5 deletions Documents/TODO.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
TODO
1. CUT source ep edge also
3. Detect bidirectional edge and correctly display it w/o parallelization
4. CHeck printing

Add edge labels - labels on path
http://www.codeproject.com/Articles/30090/Text-On-A-Path-in-WPF

Use DrawVisual for edges at least... performance

http://en.wikipedia.org/wiki/Automatic_label_placement


NOTES
1. If custom object 1st time position is incorrect - CHECK if it has Arrange() specified in LayoutUpdated event!
1. If custom object 1st time position is incorrect - CHECK if it has Arrange() specified in LayoutUpdated event!


perf
http://blogs.msdn.com/b/llobo/archive/2009/11/10/new-wpf-features-cached-composition.aspx?wa=wsignin1.0
2 changes: 1 addition & 1 deletion Examples/ShowcaseApp.WPF/Pages/GeneralGraph.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private void gg_saveAsPngImage_Click(object sender, RoutedEventArgs e)

private void gg_printlay_Click(object sender, RoutedEventArgs e)
{
gg_Area.PrintDialog("GraphX layout printing");
gg_Area.PrintDialog(false, "GraphX layout printing");
}

private void gg_vertexCount_PreviewTextInput(object sender, TextCompositionEventArgs e)
Expand Down
59 changes: 52 additions & 7 deletions GraphX.Controls/Behaviours/HighlightBehaviour.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#if WPF

using System.Linq;
#if WPF
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
Expand All @@ -20,6 +22,17 @@ public static class HighlightBehaviour
public static readonly DependencyProperty IsHighlightEnabledProperty = DependencyProperty.RegisterAttached("IsHighlightEnabled", typeof(bool), typeof(HighlightBehaviour), new PropertyMetadata(false, OnIsHighlightEnabledPropertyChanged));
public static readonly DependencyProperty HighlightControlProperty = DependencyProperty.RegisterAttached("HighlightControl", typeof(GraphControlType), typeof(HighlightBehaviour), new PropertyMetadata(GraphControlType.VertexAndEdge));
public static readonly DependencyProperty HighlightEdgesProperty = DependencyProperty.RegisterAttached("HighlightEdges", typeof(EdgesType), typeof(HighlightBehaviour), new PropertyMetadata(EdgesType.Out));
public static readonly DependencyProperty HighlightedEdgeTypeProperty = DependencyProperty.RegisterAttached("HighlightedEdgeType", typeof(HighlightedEdgeType), typeof(HighlightBehaviour), new PropertyMetadata(HighlightedEdgeType.None));

public static HighlightedEdgeType GetHighlightedEdgeType(DependencyObject obj)
{
return (HighlightedEdgeType)obj.GetValue(HighlightedEdgeTypeProperty);
}

public static void SetHighlightedEdgeType(DependencyObject obj, HighlightedEdgeType value)
{
obj.SetValue(HighlightedEdgeTypeProperty, value);
}

public static bool GetIsHighlightEnabled(DependencyObject obj)
{
Expand Down Expand Up @@ -116,10 +129,17 @@ static void element_MouseLeave(object sender, PointerRoutedEventArgs e)
var type = GetHighlightControl(sender as DependencyObject);
var edgesType = GetHighlightEdges(sender as DependencyObject);
SetHighlighted(sender as DependencyObject, false);
foreach (var item in ctrl.RootArea.GetRelatedControls(ctrl, type, edgesType))
{
SetHighlighted(item as Control, false);
}

if (type == GraphControlType.Vertex || type == GraphControlType.VertexAndEdge)
foreach (var item in ctrl.RootArea.GetRelatedVertexControls(ctrl, edgesType).Cast<DependencyObject>())
SetHighlighted(item, false);

if (type == GraphControlType.Edge || type == GraphControlType.VertexAndEdge)
foreach (var item in ctrl.RootArea.GetRelatedEdgeControls(ctrl, edgesType).Cast<DependencyObject>())
{
SetHighlighted(item, false);
SetHighlightedEdgeType(item, HighlightedEdgeType.None);
}
}

#if WPF
Expand All @@ -135,9 +155,27 @@ static void element_MouseEnter(object sender, PointerRoutedEventArgs e)
var type = GetHighlightControl(sender as DependencyObject);
var edgesType = GetHighlightEdges(sender as DependencyObject);
SetHighlighted(sender as DependencyObject, true);
foreach (var item in ctrl.RootArea.GetRelatedControls(ctrl, type, edgesType))

//highlight related vertices
if(type == GraphControlType.Vertex || type == GraphControlType.VertexAndEdge)
foreach (var item in ctrl.RootArea.GetRelatedVertexControls(ctrl, edgesType).Cast<DependencyObject>())
SetHighlighted(item, true);
//highlight related edges
if (type == GraphControlType.Edge || type == GraphControlType.VertexAndEdge)
{
SetHighlighted(item as Control, true);
//separetely get in and out edges to set direction flag
if (edgesType == EdgesType.In || edgesType == EdgesType.All)
foreach (var item in ctrl.RootArea.GetRelatedEdgeControls(ctrl, EdgesType.In).Cast<DependencyObject>())
{
SetHighlighted(item, true);
SetHighlightedEdgeType(item, HighlightedEdgeType.In);
}
if (edgesType == EdgesType.Out || edgesType == EdgesType.All)
foreach (var item in ctrl.RootArea.GetRelatedEdgeControls(ctrl, EdgesType.Out).Cast<DependencyObject>())
{
SetHighlighted(item, true);
SetHighlightedEdgeType(item, HighlightedEdgeType.Out);
}
}
}
#endregion
Expand All @@ -148,5 +186,12 @@ public enum HighlightType
Edge,
VertexAndEdge
}

public enum HighlightedEdgeType
{
In,
Out,
None
}
}
}
Loading

0 comments on commit 59bae38

Please sign in to comment.