Changeset 20357


Ignore:
Timestamp:
03/25/16 15:18:27 (9 years ago)
Author:
dlcheng
Message:

CHG (javascript): Increasing colorbar display resolution and fixing distortion for vertical colorbars.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/applyoptions.js

    r20025 r20357  
    7373                                        if (options.exist('colorbarcanvasid')&&!ccanvashtml.hasOwnProperty('init')){
    7474                                                //store actual colobar size
    75                                                 cwidth = ccanvas.width();
    76                                                 cheight = ccanvas.height();
     75                                                cwidth = ccanvashtml.clientWidth;
     76                                                cheight = ccanvashtml.clientHeight;
     77                                                ccanvas.attr({width:cwidth+cheightoffset*4,height:cheight+cheightoffset*2}).css({width:cwidth+cheightoffset*4,height:cheight+cheightoffset*2});
    7778                                                //get html object instead of jqurey object to modify height/width to accomodate labels
    78                                                 ccanvashtml.width = ccanvas.width()+cheightoffset*6;
    79                                                 ccanvashtml.height = cheight+cheightoffset*2;
    8079                                                ccanvashtml.cwidth = cwidth;
    8180                                                ccanvashtml.cheight = cheight;
     
    146145                                        if (options.exist('colorbarcanvasid')&&!ccanvashtml.hasOwnProperty('init')){
    147146                                                //store actual colobar size
    148                                                 cwidth = ccanvas.width();
    149                                                 cheight = ccanvas.height();
     147                                                cwidth = ccanvashtml.clientWidth;
     148                                                cheight = ccanvashtml.clientHeight;
    150149                                                //get html object instead of jqurey object to modify height/width to accomodate labels
    151150                                                ccanvashtml.width = cwidth+cheightoffset*6;
Note: See TracChangeset for help on using the changeset viewer.