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/] [imageFrame.js] - Blame information for rev 15

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
   zoomOutInEl();
18
   return true;
19
}
20
 
21
function zoomout() {
22
   if (scale <= 1) {
23
      scale /= 2;
24
   } else {
25
      scale -= 1;
26
   }
27
   zoomOutInEl();
28
   return true;
29
}
30
 
31
function viewall() {
32
   scale = 1;
33
   zoomOutInEl();
34
   return true;
35
}
36
 
37
function getOpenupUrl() {
38
   var url = top.fixPath(location.pathname);
39
   url = url.replace(/ContentFrame\d/, '');  // remove any ContentFame0 etc
40
   var eID = top.menu.theMenu.findEntry(url, "url", "right");
41
   if (eID == -1) {
42
      // This may be a concurrent state/flow diagram, so look for the default
43
      // view name form
44
      var pArray = url.split("/");
45
      pArray = pArray.slice(pArray.length-3, pArray.length-1);
46
      url = pArray.join("/");
47
      eID = top.menu.theMenu.findEntry(url, "url", "contains");
48
   }
49
   if (eID == -1) {
50
      return "";
51
   }
52
   var pID = top.menu.theMenu.entry[eID].parent;
53
 
54
   if (pID > -1 && top.menu.theMenu.entry[pID].url != '') {
55
      return top.menu.theMenu.entry[pID].url;
56
   }
57
   return "";
58
}
59
 
60
/*
61
function openupMachineName() {
62
   var url = top.fixPath(location.pathname);
63
   var pArray = url.split("/");
64
 
65
   // file name is the last element of this array
66
   var filename = pArray[pArray.length - 1];
67
   pArray = pArray.slice(pArray.length-3, pArray.length-1);
68
   url = pArray.join("/");
69
 
70
   var finish = false;
71
   var menuIndex = -1;
72
   while (finish == false)
73
   {
74
      // split the file name up and remove the last bit
75
      var machineArray = filename.split("_");
76
      if (machineArray.length == 1) {
77
         // we've run out of bits - give up
78
         finish = true;
79
      }
80
      else {
81
         machineArray = machineArray.slice(0, machineArray.length-1);
82
 
83
         // now put it all back together to find the parent url
84
         var filename = machineArray.join("_");
85
         var newurl = url + "/" + filename;
86
         eID = top.menu.theMenu.findEntry(newurl, "url", "contains");
87
 
88
         if (eID != -1) {
89
            finish = true;
90
         }
91
      }
92
   }
93
   if (eID != -1 && top.menu.theMenu.entry[eID].url != '') {
94
      parent.location.href = '../../' + top.menu.theMenu.entry[eID].url;
95
   }
96
   return true;
97
}
98
*/
99
 
100
// open up using only the machine name.
101
// This is for views that do not appear in the menu list but are not top level
102
function openupMachineName() {
103
   var url = top.fixPath(location.pathname);
104
   var pArray = url.split("/");
105
 
106
   // file name is the last element of this array
107
   var filename = pArray[pArray.length - 1];
108
   pArray = pArray.slice(0, pArray.length-1);
109
   url = pArray.join("/");
110
 
111
   // split the file name up and remove the last bit
112
   var machineArray = filename.split("_");
113
   machineArray = machineArray.slice(0, machineArray.length-1);
114
 
115
   // now put it all back together to find the parent url
116
   var newname = machineArray.join("_");
117
   var newurl = url + "/" + newname + ".htm";
118
 
119
   parent.location.href = newurl;
120
   return true;
121
}
122
 
123
function openupGraphical() {
124
        var url = getOpenupUrl();
125
        if (url == "") {
126
                return true;
127
        }
128
 
129
    parent.location.href = '../../' + url;
130
}
131
 
132
function openupText() {
133
        var url = getOpenupUrl();
134
        if (url == "") {
135
                return true;
136
        }
137
 
138
    parent.location.href = '../' + url;
139
}
140
 
141
function zoomOutInEl(){
142
    newWidth  = uart_topImage.width * scale;
143
    newHeight = uart_topImage.height * scale;
144
    bigImStr = "<IMG NAME='imBig' SRC='" + uart_topImage.src + "' WIDTH=" + newWidth + " HEIGHT=" + newHeight + " BORDER=0 usemap='#zoomMap'>";
145
    bigImMapStr = "<map name=\"zoomMap\">";
146
    for (var area = 0; area < areas.length;area++) {
147
      bigImMapStr += areas[area].areaString(scale);
148
    }
149
    bigImMapStr += "</map>";
150
 
151
    if (!zoomable) {
152
       if (zoomed) { return; }
153
       document.write(bigImStr + bigImMapStr);
154
    } else if (is.nav4) {
155
        with (document.elZoom.document) {
156
            open();
157
            write(bigImStr);
158
            write(bigImMapStr);
159
            close();
160
        }
161
        document.elZoom.moveTo(uart_topImage.x, uart_topImage.y);
162
        document.elZoom.visibility = "visible";
163
    }
164
    else {
165
       elHTML = bigImStr + bigImMapStr;
166
       document.getElementById('elZoom').innerHTML = bigImMapStr + bigImStr;
167
 
168
       document.getElementById('elZoom').left = uart_topImage.x;
169
       document.getElementById('elZoom').top = uart_topImage.y;
170
       document.getElementById('elZoom').style.visibility = "visible";
171
    };
172
 
173
    zoomed = true;
174
}
175
 
176
var zoomable = true;
177
var zoomed = false;
178
if (is.nav6) {
179
   zoomable = false;
180
   zoomOutInEl();
181
} else {
182
  if (is.major >= 4) {
183
      document.write("<DIV ID='elZoom' STYLE='position: absolute; visibility: hidden;'></DIV>");
184
      if (is.ie4up) { document.elZoom = document.all.elZoom.style }
185
  }
186
  window.onResize=zoomOutInEl;
187
}
188
 
189
//-->
190
 

powered by: WebSVN 2.1.0

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