Changeset 0edc9f2


Ignore:
Timestamp:
Jun 6, 2011 1:15:41 PM (3 years ago)
Author:
riccardo <riccardo@…>
Branches:
master, crem, crem2, dev, dev2, diadems, dj1.6, feature/breadcrumbs, feature/ts-0.5, feature/ts-0.5.4, feature/writecache, forma, generic, instru_search, lam, lam2, mapsv3, merge, nlivemulti, production, release/1.4.4, sabiod, security, server, social, storage, telecaster, test, video
Children:
a123cf3
Parents:
9acae9b
git-author:
riccardo <riccardo@…> (06/06/2011 13:15:41)
git-committer:
riccardo <riccardo@…> (06/06/2011 13:15:41)
Message:

fixed bug on timescale for numbers begginning with '0' due to parseInt behaviour (forcing base-10 parsing)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • telemeta/htdocs/js/playerLoader.js

    r9d5dd4e r0edc9f2  
    108108        var markersUI = "#markers_div_id"; 
    109109        var msgElm = $J('#loading_span_text').html('Loading sound info...'); 
    110         var uinqid_ = Timeside.utils.uniqid; //defined in application.js 
     110        //var uinqid_ = Timeside.utils.uniqid; //defined in application.js 
    111111        var pFloat = parseFloat; 
    112112        //load analyser xml and proceed on success: 
     
    143143                var pin = parseInt; 
    144144                 
    145                 var timeInMSecs=pin(duration[0])*3600+pin(duration[1])*60+pFloat(duration[2]); 
     145                var radix = 10; //REALLY IMPORTANT. IF ANY ELEMENT OF DURATION STARTS WITH '0', THEN THE RADIX IS CONSIDERED EITHER OCTAL OR HEXADECIMAL 
     146                //WE WANT TO PREVENT NON 10-BASED RADIX PARSING 
     147                var timeInMSecs=pin(duration[0],radix)*3600+pin(duration[1],radix)*60+pFloat(duration[2],radix); 
    146148                timeInMSecs = Math.round(timeInMSecs*1000); 
    147149                var callbackAfterMarkersLoading = function(data) { 
     
    185187                        markerMode = function(offset){ 
    186188                            var m = { 
    187                                 id: uinqid_(), 
     189                                //id: uinqid_(), //will be set in markermap 
    188190                                offset: pFloat(offset), 
    189191                                desc: "", 
Note: See TracChangeset for help on using the changeset viewer.