Skip to content

Commit

Permalink
AnnotatedDiagram option to hide links
Browse files Browse the repository at this point in the history
  • Loading branch information
mussaf committed Jun 24, 2022
1 parent f2794bb commit 2b20b2d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Expand Up @@ -150,22 +150,22 @@

} else {
// arrow or line
debugger

var $hs = $($hsHolder.children()[$this.index()]);

if ($hs.hasClass("hsGroup")) {
$hs.children()
.each(function(){
if(x_currentPageXML.getAttribute("link") == "true" || x_currentPageXML.getAttribute("link") == undefined){
debugger
if(x_currentPageXML.getAttribute("link") == "false" || x_currentPageXML.getAttribute("link") == undefined){
annotatedDiagram.drawLine($(this), $this, shape);
}else{
annotatedDiagram.drawLineToText($(this), shape);
}

});
} else {
if(x_currentPageXML.getAttribute("link") == "true" || x_currentPageXML.getAttribute("link") == undefined){
debugger
if(x_currentPageXML.getAttribute("link") == "false" || x_currentPageXML.getAttribute("link") == undefined){
annotatedDiagram.drawLine($hs, $this, shape);
}else{
annotatedDiagram.drawLineToText($hs, shape);
Expand Down Expand Up @@ -216,8 +216,9 @@
$("#imageHolder").html('<p>Flash files (.swf) are no longer supported</p>');
x_pageLoaded();
}

debugger
if(x_currentPageXML.getAttribute("link") == "false"){
if(x_currentPageXML.getAttribute("link") == "true"){
$("#listHolder").css("display", "none")
}
}
Expand Down Expand Up @@ -541,7 +542,6 @@
}

this.drawLine = function($hs, $listItem, shape) {
debugger
var align = x_browserInfo.mobile == true ? "Top" : x_currentPageXML.getAttribute("align");

// startX/Y = centre of hotspot
Expand Down Expand Up @@ -572,7 +572,7 @@
var startY = $hs.offset().top - $(context.canvas).offset().top + ($hs.height() / 2);

var endX = $("#panel").offset().left - parseInt($panel.css("margin-left")) - parseInt($panel.css("padding-left"));
var endY = $("#panel").offset().top - $(context.canvas).offset().top + ($hs.height() / 2);
var endY = $("#infoHolder").offset().top;

context.beginPath();
context.moveTo(startX, startY);
Expand Down
Expand Up @@ -726,7 +726,7 @@
<colour label="Colour" type="ColourPicker" defaultValue="0xFFFF00"/>
</hs>

<link label="Links" type="Checkbox" optional="true" defaultValue="true" tooltip="Enable or disable the links"/>
<link label="Hide list" type="Checkbox" optional="true" defaultValue="false" tooltip="Enable or disable the list"/>

<movieSize label="Video Size (w,h)" type="textInput" defaultValue="320,240" optional="true" deprecated="This property is deprecated."/>

Expand Down
2 changes: 1 addition & 1 deletion src/Nottingham/wizards/en-GB/annotatedDiagram.xwd
Expand Up @@ -23,7 +23,7 @@
<colour label="Colour" type="ColourPicker" defaultValue="0xFFFF00" />
</hs>

<link label="Links" type="Checkbox" optional="true" defaultValue="true" tooltip="Enable or disable the links" />
<link label="Hide list" type="Checkbox" optional="true" defaultValue="false" tooltip="Enable or disable the list" />

<movieSize label="Video Size (w,h)" type="textInput" defaultValue="320,240" optional="true" deprecated="This property is deprecated."/>

Expand Down
2 changes: 1 addition & 1 deletion src/Nottingham/wizards/en-GB/template.xwd
Expand Up @@ -726,7 +726,7 @@
<colour label="Colour" type="ColourPicker" defaultValue="0xFFFF00"/>
</hs>

<link label="Links" type="Checkbox" optional="true" defaultValue="true" tooltip="Enable or disable the links"/>
<link label="Hide list" type="Checkbox" optional="true" defaultValue="false" tooltip="Enable or disable the list"/>

<movieSize label="Video Size (w,h)" type="textInput" defaultValue="320,240" optional="true" deprecated="This property is deprecated."/>

Expand Down

0 comments on commit 2b20b2d

Please sign in to comment.