Skip to content

882136: UG documentation for MVC and Core #3115

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

Open
wants to merge 4 commits into
base: hotfix/hotfix-v26.1.35
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Syncfusion.EJ2.Diagrams;
using System.Drawing;

namespace EJ2MVCSampleBrowser.Controllers.Diagram {
public partial class DiagramController: Controller {
public ActionResult Nodes() {
List < DiagramNode > nodes = new List < DiagramNode > ();
// A fixed user handle is created and stored in fixed user handle collection of Node.
List<DiagramNodeFixedUserHandle> handle = new List<DiagramNodeFixedUserHandle>();
handle.Add(new DiagramNodeFixedUserHandle() { Tooltip = new DiagramDiagramTooltip() { Content = "Handle1", Position = "TopLeft", RelativeMode= TooltipRelativeMode.Object}, Margin = new DiagramMargin() {Right=20 },Width=20,Height=20, PathData = "M60.3,18H27.5c-3,0-5.5,2.4-5.5,5.5v38.2h5.5V23.5h32.7V18z M68.5,28.9h-30c-3,0-5.5,2.4-5.5,5.5v38.2c0,3,2.4,5.5,5.5,5.5h30c3,0,5.5-2.4,5.5-5.5V34.4C73.9,31.4,71.5,28.9,68.5,28.9z M68.5,72.5h-30V34.4h30V72.5z" });
nodes.Add(new DiagramNode() {
Id = "node1",
Width = 100,
Height = 100,
BorderWidth=2,
Style = new NodeStyleNodes() {
Fill = "darkcyan"
},
OffsetX = 100,
OffsetY = 100,
FixedUserHandles = handle
});
ViewBag.nodes = nodes;
return View();
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<ejs-diagram id="container" width="100%" height="700px" nodes="@ViewBag.nodes">
</ejs-diagram>
24 changes: 24 additions & 0 deletions ej2-asp-core-mvc/diagram/user-handle.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,27 @@ To show tooltip on mouse over, the [`tooltip`](../api/diagram#tooltip) property
{% endhighlight %}
{% endtabs %}
{% endif %}

### Tooltip support for Fixed User Handle

The diagram provides support to show tooltip when the mouse hovers over any fixed user handle. To show the tooltip on mouse over, the [`tooltip`](../api/diagram#tooltip) property of diagram model needs to be set with the tooltip [`content`](../api/diagram/diagramTooltip/#content) and [`position`](../api/diagram/diagramTooltip/#position) as shown in the following example.

{% if page.publishingplatform == "aspnet-core" %}

{% tabs %}
{% highlight cshtml tabtitle="CSHTML" %}
{% include code-snippet/diagram/interaction/nodefixeduserhandle2/tagHelper %}
{% endhighlight %}
{% highlight c# tabtitle="Node.cs" %}
{% include code-snippet/diagram/interaction/nodefixeduserhandle2/node.cs %}
{% endhighlight %}
{% endtabs %}

{% elsif page.publishingplatform == "aspnet-mvc" %}

{% tabs %}
{% highlight c# tabtitle="Node.cs" %}
{% include code-snippet/diagram/interaction/nodefixeduserhandle2/node.cs %}
{% endhighlight %}
{% endtabs %}
{% endif %}