OpenCores
URL https://opencores.org/ocsvn/cpu65c02_true_cycle/cpu65c02_true_cycle/trunk

Subversion Repositories cpu65c02_true_cycle

[/] [cpu65c02_true_cycle/] [branches/] [avendor/] [doc/] [HTML/] [scripts/] [SVGImageFrame.js] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 fpga_is_fu
<!--
2
 
3
function goback() {
4
   parent.history.back();
5
}
6
 
7
function goforward() {
8
   parent.history.forward();
9
}
10
 
11
function zoomin() {
12
   if (scale < 1) {
13
      scale *= 2;
14
   } else {
15
      scale += 1;
16
   }
17
   return true;
18
}
19
 
20
function zoomout() {
21
   if (scale <= 1) {
22
      scale /= 2;
23
   } else {
24
      scale -= 1;
25
   }
26
   return true;
27
}
28
 
29
function viewall() {
30
   scale = 1;
31
   return true;
32
}
33
 
34
function getOpenupUrl() {
35
   var url = top.fixPath(location.pathname);
36
   url = url.replace(/ContentFrame\d/, '');  // remove any ContentFame0 etc
37
   var eID = top.menu.theMenu.findEntry(url, "url", "right");
38
   if (eID == -1) {
39
      // This may be a concurrent state/flow diagram, so look for the default
40
      // view name form
41
      var pArray = url.split("/");
42
      pArray = pArray.slice(pArray.length-3, pArray.length-1);
43
      url = pArray.join("/");
44
      eID = top.menu.theMenu.findEntry(url, "url", "contains");
45
   }
46
   if (eID == -1) {
47
      return "";
48
   }
49
   var pID = top.menu.theMenu.entry[eID].parent;
50
 
51
   if (pID > -1 && top.menu.theMenu.entry[pID].url != '') {
52
      return top.menu.theMenu.entry[pID].url;
53
   }
54
   return "";
55
}
56
 
57
/*
58
function openupMachineName() {
59
   var url = top.fixPath(location.pathname);
60
   var pArray = url.split("/");
61
 
62
   // file name is the last element of this array
63
   var filename = pArray[pArray.length - 1];
64
   pArray = pArray.slice(pArray.length-3, pArray.length-1);
65
   url = pArray.join("/");
66
 
67
   var finish = false;
68
   var menuIndex = -1;
69
   while (finish == false)
70
   {
71
      // split the file name up and remove the last bit
72
      var machineArray = filename.split("_");
73
      if (machineArray.length == 1) {
74
         // we've run out of bits - give up
75
         finish = true;
76
      }
77
      else {
78
         machineArray = machineArray.slice(0, machineArray.length-1);
79
 
80
         // now put it all back together to find the parent url
81
         var filename = machineArray.join("_");
82
         var newurl = url + "/" + filename;
83
         eID = top.menu.theMenu.findEntry(newurl, "url", "contains");
84
 
85
         if (eID != -1) {
86
            finish = true;
87
         }
88
      }
89
   }
90
   if (eID != -1 && top.menu.theMenu.entry[eID].url != '') {
91
      parent.location.href = '../../' + top.menu.theMenu.entry[eID].url;
92
   }
93
   return true;
94
}
95
*/
96
 
97
// open up using only the machine name.
98
// This is for views that do not appear in the menu list but are not top level
99
function openupMachineName() {
100
   var url = top.fixPath(location.pathname);
101
   var pArray = url.split("/");
102
 
103
   // file name is the last element of this array
104
   var filename = pArray[pArray.length - 1];
105
   pArray = pArray.slice(0, pArray.length-1);
106
   url = pArray.join("/");
107
 
108
   // split the file name up and remove the last bit
109
   var machineArray = filename.split("_");
110
   machineArray = machineArray.slice(0, machineArray.length-1);
111
 
112
   // now put it all back together to find the parent url
113
   var newname = machineArray.join("_");
114
   var newurl = url + "/" + newname + ".htm";
115
 
116
   parent.location.href = newurl;
117
   return true;
118
}
119
 
120
function openupGraphical() {
121
   var url = getOpenupUrl();
122
   if (url == "") {
123
      return true;
124
   }
125
 
126
   parent.location.href = '../../' + url;
127
}
128
 
129
function openupText() {
130
   var url = getOpenupUrl();
131
   if (url == "") {
132
      return true;
133
   }
134
 
135
   parent.location.href = '../' + url;
136
}
137
 
138
function changeSVG(newSVG) {
139
   document.getElementById('SVGID').SRC = newSVG;
140
}
141
 
142
var zoomable = true;
143
var zoomed = false;
144
if (is.nav6) {
145
   zoomable = false;
146
} else {
147
  if (is.major >= 4) {
148
      document.write("<DIV ID='elZoom' STYLE='position: absolute; visibility: hidden;'></DIV>");
149
  }
150
}
151
 
152
//-->
153
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.