diff -r 4c86151704e9 -r 3daa4039509a web/res/metadataplayer.polemic/src/js/polemic.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/res/metadataplayer.polemic/src/js/polemic.js Fri Apr 22 12:38:18 2011 +0200 @@ -0,0 +1,306 @@ +/* + * + * Copyright 2010 Institut de recherche et d'innovation + * contributor(s) : Samuel Huron + * + * contact@iri.centrepompidou.fr + * http://www.iri.centrepompidou.fr + * + * This software is a computer program whose purpose is to show and add annotations on a video . + * This software is governed by the CeCILL-C license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL-C + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL-C license and that you accept its terms. +*/ +// CHART TIMELINE / VERSION PROTOTYPE :: + + + var yMax = config.height; + var PaperSlider; + var heightOfChart; + // Make and define the Raphael area + //var paper = Raphael(document.getElementById(config.target),config.width, config.height); + + function ChartTimeLine (){ + + // variable + // yMax + var yCoef = 2; // coef for height of 1 tweet + var frameSize = 5; // frame size + var margin = 1; // marge between frame + var lineSize = config.width; // timeline pixel width + var nbrframes = lineSize/frameSize; // frame numbers + var numberOfTweet = 0; // number of tweet overide later + var duration = config.duration; // timescale width + var frameLenght = lineSize/frameSize; // frame timescale + var timeline; + var colors = new Array("","#1D973D","#C5A62D","#CE0A15","#036AAE","#585858"); + + // array + var tweets = new Array(); + var element = new Array(); + var cluster = new Array(); + var frames = new Array(frameLenght); + var slices = new Array(); + + + // Classes ======================================================================= + var Frames = function(){ + + var Myclusters; + var x; + var y; + var width; + var height; + }; + Frames = function(json){ + // make my clusters + // ou Frame vide + }; + Frames.prototype.draw = function(){ + } + Frames.prototype.zoom = function(){ + } + Frames.prototype.inside = function(){ + } + var Clusters = function(){ + var Object; + var yDist; + var x; + var y; + var width; + var height; + }; + Clusters = function(json){ + // make my object + }; + var Tweet = function(){ + } + // Classes ======================================================================= + + // trace function + var traceNum = 0; + function trace(msg,value){ + traceNum += 1; + __IriSP.jQuery("