Commit efe8b5ef authored by Bertrand  NÉRON's avatar Bertrand NÉRON

remove test dir which was test for secreton project

parent 893885de
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="500"
height="300"
onload="init(evt)">
<style>
.territory:hover{
fill: #22aa44;
}
.compass{
fill: #fff;
stroke: #000;
stroke-width: 1.5;
}
.button{
fill: #225EA8;
stroke: #0C2C84;
stroke-miterlimit: 6;
stroke-linecap: round;
}
.button:hover{
stroke-width: 2;
}
.plus-minus{
fill: #fff;
pointer-events: none;
}
</style>
<script type="text/ecmascript">
<![CDATA[
var transMatrix = [2,0,0,2,0,0];
function init(evt)
{
if ( window.svgDocument == null )
{
svgDoc = evt.target.ownerDocument;
}
mapMatrix = svgDoc.getElementById("map-matrix");
width = evt.target.getAttributeNS(null, "width");
height = evt.target.getAttributeNS(null, "height");
}
function pan(dx, dy)
{
transMatrix[4] += dx;
transMatrix[5] += dy;
newMatrix = "matrix(" + transMatrix.join(' ') + ")";
mapMatrix.setAttributeNS(null, "transform", newMatrix);
}
function zoom(scale)
{
for (var i=0; i<transMatrix.length; i++)
{
transMatrix[i] *= scale;
}
transMatrix[4] += (1-scale)*width/2;
transMatrix[5] += (1-scale)*height/2;
newMatrix = "matrix(" + transMatrix.join(' ') + ")";
mapMatrix.setAttributeNS(null, "transform", newMatrix);
}
]]>
</script>
<g id="map-matrix" transform="matrix(2 0 0 2 0 0)">
<path
id="WA"
class="territory"
fill="#a9a9a9"
d="m 38.3, 168.2 c -1.9,-0.6 -3.6,-1.1 -3.8,-1.3 -0.2,-0.2 0.8,-2.5 2.25,-5.2 1.4,-2.7 2.6,-5.5 2.6,-6.2 0,-0.8 -1.8,-4.25 -4,-7.7 -2.2,-3.5 -4,-7.1 -4,-8.1 l 0,-1.8 -6.4,-10.3 -6.4,-10.3 1.8,0 -7,-14.8 0.2,-7.3 c 0.1,-4 0.1,-8.9 0.1,-10.9 l -0.1,-3.5 5.5,-6 c 3,-3.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z"/>
<g
id="NT"
class="territory"
fill="#a9a9a9">
<path
d="m 99,33 3.9,0.4 c 2,0.2 4.4,-0.5 5.5,-1 l 1.9,-1 0,-2.5 0,-2.5 -2,0 0,-4 1.9,-1.7 c 1,-0.9 1.7,-2 1.5,-2.4 l -0.5,-0.7 6.8,-4.2 11.5,-1.4 0.8,-2.4 -5.6,-3 1.7,0 c 0.9,0 2,0.4 2.3,1 0.3,0.6 1.2,0.9 1.8,0.8 0.6,-0.1 3.4,0.8 6.2,2.1 l 5,2.4 7.5,0 0,3.7 -4.2,4 1.2,3.2 -3,5.8 17,11.2 0,60.8 -61,0 z" />
<path
d="m 115,8.7 -2.8,-0.4 0.8,-2.4 4.2,0 c 2.3,0 4.2,0.2 4.2,0.5 0,0.8 -2.3,3 -2.9,2.8 -0.3,-0 -1.8,-0.3 -3.4,-0.6 z"/>
</g>
<g
id="TAS"
class="territory"
fill="#a9a9a9">
<path
d="m 202.7,223.9 -2.7,-3.6 -0.1,-3.4 c -0.1,-1.9 -0.4,-3.7 -0.8,-4.1 -0.4,-0.4 -0.7,-1.8 -0.7,-3.1 l 0,-2.3 1,0 c 0.6,0 2.4,0.7 4.2,1.6 l 3.1,1.6 9.6,-1.2 0,7.2 -3.4,5.8 -2.6,-1 -1.7,3 c -0.9,1.6 -2,3 -2.4,3 -0.4,0 -1.9,-1.6 -3.4,-3.6 z" />
</g>
<g id="ACT"
class="territory"
fill="#a9a9a9">
<path
stroke-width="1.5"
stroke="#ffffff"
d="m 222,165.7 0.1,2.8 0.4,1.4 1,1 0.4,-0.9 0.2,2.9 2.6,1.6 1,-2.2 0,-3.6 c 0,0 -0.3,-0.5 -0.6,-1.1 0.8,-0.3 1.2,0.1 1.2,0.1 l 0.1,-3.4 1.5,-2 2.4,0.3 0.5,-1 -2.7,-1.3 c 0,0 -0.7,-1.8 -1.8,-2.4 -1.6,1.1 -4,2 -5.2,3.9 -0.4,0.7 -0.5,2.3 -0.5,2.3 z"/>
</g>
</g>
<circle cx="50" cy="50" r="42" fill="white" opacity="0.75"/>
<path class="button" onclick="pan( 0, 50)" d="M50 10 l12 20 a40, 70 0 0,0 -24, 0z" />
<path class="button" onclick="pan( 50, 0)" d="M10 50 l20 -12 a70, 40 0 0,0 0, 24z" />
<path class="button" onclick="pan( 0,-50)" d="M50 90 l12 -20 a40, 70 0 0,1 -24, 0z" />
<path class="button" onclick="pan(-50, 0)" d="M90 50 l-20 -12 a70, 40 0 0,1 0, 24z" />
<circle class="compass" cx="50" cy="50" r="20"/>
<circle class="button" cx="50" cy="41" r="8" onclick="zoom(0.8)"/>
<circle class="button" cx="50" cy="59" r="8" onclick="zoom(1.25)"/>
<rect class="plus-minus" x="46" y="39.5" width="8" height="3"/>
<rect class="plus-minus" x="46" y="57.5" width="8" height="3"/>
<rect class="plus-minus" x="48.5" y="55" width="3" height="8"/>
</svg>
Raphael.fn.drawGrid = function (x, y, w, h, wv, hv, color) {
color = color || "#000";
var path = ["M", Math.round(x) + .5, Math.round(y) + .5, "L", Math.round(x + w) + .5, Math.round(y) + .5, Math.round(x + w) + .5, Math.round(y + h) + .5, Math.round(x) + .5, Math.round(y + h) + .5, Math.round(x) + .5, Math.round(y) + .5],
rowHeight = h / hv,
columnWidth = w / wv;
for (var i = 1; i < hv; i++) {
path = path.concat(["M", Math.round(x) + .5, Math.round(y + i * rowHeight) + .5, "H", Math.round(x + w) + .5]);
}
for (i = 1; i < wv; i++) {
path = path.concat(["M", Math.round(x + i * columnWidth) + .5, Math.round(y) + .5, "V", Math.round(y + h) + .5]);
}
return this.path(path.join(",")).attr({stroke: color});
};
$(function () {
$("#data").css({
position: "absolute",
left: "-9999em",
top: "-9999em"
});
});
window.onload = function () {
function getAnchors(p1x, p1y, p2x, p2y, p3x, p3y) {
var l1 = (p2x - p1x) / 2,
l2 = (p3x - p2x) / 2,
a = Math.atan((p2x - p1x) / Math.abs(p2y - p1y)),
b = Math.atan((p3x - p2x) / Math.abs(p2y - p3y));
a = p1y < p2y ? Math.PI - a : a;
b = p3y < p2y ? Math.PI - b : b;
var alpha = Math.PI / 2 - ((a + b) % (Math.PI * 2)) / 2,
dx1 = l1 * Math.sin(alpha + a),
dy1 = l1 * Math.cos(alpha + a),
dx2 = l2 * Math.sin(alpha + b),
dy2 = l2 * Math.cos(alpha + b);
return {
x1: p2x - dx1,
y1: p2y + dy1,
x2: p2x + dx2,
y2: p2y + dy2
};
}
// Grab the data
var labels = [],
data = [];
$("#data tfoot th").each(function () {
labels.push($(this).html());
});
$("#data tbody td").each(function () {
data.push($(this).html());
});
// Draw
var width = 800,
height = 250,
leftgutter = 30,
bottomgutter = 20,
topgutter = 20,
colorhue = .6 || Math.random(),
color = "hsl(" + [colorhue, .5, .5] + ")",
r = Raphael("holder", width, height),
txt = {font: '12px Helvetica, Arial', fill: "#fff"},
txt1 = {font: '10px Helvetica, Arial', fill: "#fff"},
txt2 = {font: '12px Helvetica, Arial', fill: "#000"},
X = (width - leftgutter) / labels.length,
max = Math.max.apply(Math, data),
Y = (height - bottomgutter - topgutter) / max;
r.drawGrid(leftgutter + X * .5 + .5, topgutter + .5, width - leftgutter - X, height - topgutter - bottomgutter, 10, 10, "#000");
var path = r.path().attr({stroke: color, "stroke-width": 4, "stroke-linejoin": "round"}),
bgp = r.path().attr({stroke: "none", opacity: .3, fill: color}),
label = r.set(),
lx = 0, ly = 0,
is_label_visible = false,
leave_timer,
blanket = r.set();
label.push(r.text(60, 12, "24 hits").attr(txt));
label.push(r.text(60, 27, "22 September 2008").attr(txt1).attr({fill: color}));
label.hide();
var frame = r.popup(100, 100, label, "right").attr({fill: "#000", stroke: "#666", "stroke-width": 2, "fill-opacity": .7}).hide();
var p, bgpp;
for (var i = 0, ii = labels.length; i < ii; i++) {
var y = Math.round(height - bottomgutter - Y * data[i]),
x = Math.round(leftgutter + X * (i + .5)),
t = r.text(x, height - 6, labels[i]).attr(txt).toBack();
if (!i) {
p = ["M", x, y, "C", x, y];
bgpp = ["M", leftgutter + X * .5, height - bottomgutter, "L", x, y, "C", x, y];
}
if (i && i < ii - 1) {
var Y0 = Math.round(height - bottomgutter - Y * data[i - 1]),
X0 = Math.round(leftgutter + X * (i - .5)),
Y2 = Math.round(height - bottomgutter - Y * data[i + 1]),
X2 = Math.round(leftgutter + X * (i + 1.5));
var a = getAnchors(X0, Y0, x, y, X2, Y2);
p = p.concat([a.x1, a.y1, x, y, a.x2, a.y2]);
bgpp = bgpp.concat([a.x1, a.y1, x, y, a.x2, a.y2]);
}
var dot = r.circle(x, y, 4).attr({fill: "#333", stroke: color, "stroke-width": 2});
blanket.push(r.rect(leftgutter + X * i, 0, X, height - bottomgutter).attr({stroke: "none", fill: "#fff", opacity: 0}));
var rect = blanket[blanket.length - 1];
(function (x, y, data, lbl, dot) {
var timer, i = 0;
rect.hover(function () {
clearTimeout(leave_timer);
var side = "right";
if (x + frame.getBBox().width > width) {
side = "left";
}
var ppp = r.popup(x, y, label, side, 1),
anim = Raphael.animation({
path: ppp.path,
transform: ["t", ppp.dx, ppp.dy]
}, 200 * is_label_visible);
lx = label[0].transform()[0][1] + ppp.dx;
ly = label[0].transform()[0][2] + ppp.dy;
frame.show().stop().animate(anim);
label[0].attr({text: data + " hit" + (data == 1 ? "" : "s")}).show().stop().animateWith(frame, anim, {transform: ["t", lx, ly]}, 200 * is_label_visible);
label[1].attr({text: lbl + " September 2008"}).show().stop().animateWith(frame, anim, {transform: ["t", lx, ly]}, 200 * is_label_visible);
dot.attr("r", 6);
is_label_visible = true;
}, function () {
dot.attr("r", 4);
leave_timer = setTimeout(function () {
frame.hide();
label[0].hide();
label[1].hide();
is_label_visible = false;
}, 1);
});
})(x, y, data[i], labels[i], dot);
}
p = p.concat([x, y, x, y]);
bgpp = bgpp.concat([x, y, x, y, "L", x, height - bottomgutter, "z"]);
path.attr({path: p});
bgp.attr({path: bgpp});
frame.toFront();
label[0].toFront();
label[1].toFront();
blanket.toFront();
};
\ No newline at end of file
body {
background: #333;
color: #fff;
font: 300 100.1% "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif;
}
#holder {
height: 480px;
left: 50%;
margin: -240px 0 0 -320px;
position: absolute;
top: 50%;
width: 640px;
}
#copy {
bottom: 0;
font: 300 .7em "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif;
position: absolute;
right: 1em;
text-align: right;
}
#copy a {
color: #fff;
}
<!DOCTYPE html>
<html>
<head>
<title>test event</title>
<!-- <script src="lib/jquery1_4_2.js" type="text/javascript"></script>-->
<link rel="stylesheet" href="style/main.css" type="text/css">
<script src="lib/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="lib/jquery.mousewheel.js" type="text/javascript"></script>
<script src="lib/raphael-min.js" type="text/javascript"></script>
</head>
<body>
<h1>titre</h1>
<div id="genes_schema" class="grabbable" style="width: 500px; height: 500px;background-color: #e6e6e6; border: 2px" >
<div id="divScroll" class="grabbable" style="width: 250px; height: 250px; background-color: #e6e6e6; border: 2px groove #f6f6f6;">use the wheel over this DIV</div>
<div id="event_log">
<p>log event</p>
</div>
</body>
<script type="text/javascript">
var paper = new Raphael("genes_schema", 500, 500);
var bckground = paper.rect( 0 , 0 , 500 , 500).attr( {fill:"pink"});
var both = paper.set();
var first_c = paper.circle(50, 75, 30);
var rec =paper.rect( 100 ,100 , 50 , 50);
both.push(first_c );
both.push(rec );
//var sec_circle = paper.circle(150, 75, 30);
$("circle").each(function(i) {
$(this).attr({fill: 'red', stroke: '#000'});
$(this).mouseup(function() {
$("#event_log").append("<p>Mouseup</p>");
});
$(this).mousedown(function(ObjectEvent) {
$("#event_log").append("<p>MouseDown</p>");
});
});
var intOverallDelta = 0;
$("#divScroll").bind("mousewheel",function(objEvent, delta , deltaX, deltaY){
objEvent.stopImmediatePropagation();
objEvent.stopPropagation();
console.log(delta, deltaX, deltaY);
objEvent.stopPropagation();
return false;
});
$("#genes_schema").bind("mousedown" , function( evt ){
console.log( "x="+evt.pageX +" y= "+evt.pageY );
$(this).toggleClass( "grabbing" ).toggleClass( "grabbable" );
console.log("mouseDown");
});
$("#genes_schema").bind("mouseup" , function(){
$(this).toggleClass( "grabbable" ).toggleClass( "grabbing" );
console.log("mouseUp");
});
/*
var nowX, nowY, R = Raphael("canvas", 500, 500),
c = R.rect(200, 200, 40, 40).attr({
fill: "hsb(.8, 1, 1)",
stroke: "none",
opacity: .5,
cursor: "move"
}),
j = R.rect(0,0,100,100),
// start, move, and up are the drag functions
start = function () {
// storing original coordinates
this.ox = this.attr("x");
this.oy = this.attr("y");
this.attr({opacity: 1});
if (this.attr("y") < 60 && this.attr("x") < 60)
this.attr({fill: "#000"});
},
move = function (dx, dy) {
// move will be called with dx and dy
if (this.attr("y") > 60 || this.attr("x") > 60)
this.attr({x: this.ox + dx, y: this.oy + dy});
else {
nowX = Math.min(60, this.ox + dx);
nowY = Math.min(60, this.oy + dy);
nowX = Math.max(0, nowX);
nowY = Math.max(0, nowY);
this.attr({x: nowX, y: nowY });
if (this.attr("fill") != "#000") this.attr({fill: "#000"});
}
},
up = function () {
// restoring state
this.attr({opacity: .5});
if (this.attr("y") < 60 && this.attr("x") < 60)
this.attr({fill: "#AEAEAE"});
};
// rstart and rmove are the resize functions;
c.drag(move, start, up);
};​
*/
//var ox = 0;
//var oy = 0;
var mousedown= function(x ,y,event) {
console.log( "raphael mousedown");
this.ox = event.screenX;
this.oy = event.screenY;
this.attr({
opacity: .5
});
};
var mousemove= function(dx, dy,x ,y ,event) {
console.log( "raphael mousemove");
this.translate(event.screenX - this.ox, event.screenY - this.oy);
this.ox = event.screenX;
this.oy = event.screenY;
};
var mouseup= function(x,y,event){
console.log( "raphael mouseup");
dragging = false;
this.attr({
opacity: 1
});
};
//bckground.drag( move ,start ,stop );
//first_c.drag( move ,start ,stop );
//bckground.drag( move ,start ,stop , first_c ,first_c, first_c );
bckground.drag( mousemove ,mousedown ,mouseup , both ,both, both );
</script>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
(function () {
var tokenRegex = /\{([^\}]+)\}/g,
objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties
replacer = function (all, key, obj) {
var res = obj;
key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) {
name = name || quotedName;
if (res) {
if (name in res) {
res = res[name];
}
typeof res == "function" && isFunc && (res = res());
}
});
res = (res == null || res == obj ? all : res) + "";
return res;
},
fill = function (str, obj) {
return String(str).replace(tokenRegex, function (all, key) {
return replacer(all, key, obj);
});
};
Raphael.fn.popup = function (X, Y, set, pos, ret) {
pos = String(pos || "top-middle").split("-");
pos[1] = pos[1] || "middle";
var r = 5,
bb = set.getBBox(),
w = Math.round(bb.width),
h = Math.round(bb.height),
x = Math.round(bb.x) - r,
y = Math.round(bb.y) - r,
gap = Math.min(h / 2, w / 2, 10),
shapes = {
top: "M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}l-{right},0-{gap},{gap}-{gap}-{gap}-{left},0a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",
bottom: "M{x},{y}l{left},0,{gap}-{gap},{gap},{gap},{right},0a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z",
right: "M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}v{h4},{h4},{h4},{h4}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}l0-{bottom}-{gap}-{gap},{gap}-{gap},0-{top}a{r},{r},0,0,1,{r}-{r}z",
left: "M{x},{y}h{w4},{w4},{w4},{w4}a{r},{r},0,0,1,{r},{r}l0,{top},{gap},{gap}-{gap},{gap},0,{bottom}a{r},{r},0,0,1,-{r},{r}h-{w4}-{w4}-{w4}-{w4}a{r},{r},0,0,1-{r}-{r}v-{h4}-{h4}-{h4}-{h4}a{r},{r},0,0,1,{r}-{r}z"
},
offset = {
hx0: X - (x + r + w - gap * 2),
hx1: X - (x + r + w / 2 - gap),
hx2: X - (x + r + gap),
vhy: Y - (y + r + h + r + gap),
"^hy": Y - (y - gap)
},
mask = [{
x: x + r,
y: y,
w: w,
w4: w / 4,
h4: h / 4,
right: 0,
left: w - gap * 2,
bottom: 0,
top: h - gap * 2,
r: r,
h: h,
gap: gap
}, {
x: x + r,
y: y,
w: w,
w4: w / 4,
h4: h / 4,
left: w / 2 - gap,
right: w / 2 - gap,
top: h / 2 - gap,
bottom: h / 2 - gap,
r: r,
h: h,
gap: gap
}, {
x: x + r,
y: y,
w: w,
w4: w / 4,
h4: h / 4,
left: 0,
right: w - gap * 2,
top: 0,
bottom: h - gap * 2,
r: r,
h: h,
gap: gap
}][pos[1] == "middle" ? 1 : (pos[1] == "top" || pos[1] == "left") * 2];
var dx = 0,
dy = 0,
out = this.path(fill(shapes[pos[0]], mask)).insertBefore(set);
switch (pos[0]) {
case "top":
dx = X - (x + r + mask.left + gap);
dy = Y - (y + r + h + r + gap);
break;
case "bottom":
dx = X - (x + r + mask.left + gap);
dy = Y - (y - gap);
break;
case "left":
dx = X - (x + r + w + r + gap);
dy = Y - (y + r + mask.top + gap);
break;
case "right":
dx = X - (x - gap);
dy = Y - (y + r + mask.top + gap);
break;
}
out.translate(dx, dy);
if (ret) {
ret = out.attr("path");
out.remove();
return {
path: ret,
dx: dx,
dy: dy
};
}
set.translate(dx, dy);
return out;
};
})();
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
.gene_sctC { background-color: BlueViolet }
.gene_sctD { background-color: Blue}
.gene_sctD2{ background-color: DarkCyan}
.gene_sctF { background-color: Cyan}
.gene_sctI { background-color: Aqua}
.gene_sctJ { background-color: DarkGreen}
.gene_sctL { background-color: Green}
.gene_sctN { background-color: ForestGreen}
.gene_sctO { background-color: LimeGreen}
.gene_sctQ { background-color: GreenYellow}
.gene_sctR { background-color: YellowGreen}
.gene_sctS { background-color: Yellow}
.gene_sctT { background-color: Gold}
.gene_sctU { background-color: GoldenRod}
.gene_sctV { background-color: Orange}
.gene_sycD { background-color: DarkOrange}
.gene_sycN { background-color: OrangeRed}
.gene_yopB { background-color: Red}
.gene_yopD { background-color: FireBrick}
.gene_yopN { background-color: Maroon}
\ No newline at end of file
/* add styles here */
body {
font:1em Helvetica, sans-serif;
}
h1 {
margin-top:0;
}
#account {
float:right;
}
#profile {