flashgrid-ext 2.2.0 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/flashgrid/ext/version.rb +1 -1
- data/vendor/assets/javascripts/chart.js +19 -3
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: dc8a1562a0f9ca9b276bd7bef00f80e9d5a2531e
         | 
| 4 | 
            +
              data.tar.gz: 13c4541874fa7f0485f119607e712edce102d9ce
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ca8c0ef30b07bd35f87468b97cc56076962232c8c43cdc7e511d307fec60e09f46a78934f77d4694164d7bcdd3b44af6a5b3f6fd4479d061a70cc784d81c8b38
         | 
| 7 | 
            +
              data.tar.gz: eef1e631a8cfbc71fd9b7fe18b0cdeacc3ce767fd016a100682ac55b1c39ff653cb1bc3ba68dcbfd1a345e1bcc674a7d0ac81576d9ee4a6866b934c67a94de80
         | 
| @@ -81,6 +81,9 @@ | |
| 81 81 | 
             
                  // Boolean - whether or not the chart should be responsive and resize when the browser does.
         | 
| 82 82 | 
             
                  responsive: true,
         | 
| 83 83 |  | 
| 84 | 
            +
                  // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
         | 
| 85 | 
            +
                  maintainAspectRatio: true,
         | 
| 86 | 
            +
             | 
| 84 87 | 
             
                  // Boolean - Determines whether to draw tooltips on the canvas or not - attaches events to touchmove & mousemove
         | 
| 85 88 | 
             
                  showTooltips: true,
         | 
| 86 89 |  | 
| @@ -392,6 +395,12 @@ | |
| 392 395 | 
             
                //Templating methods
         | 
| 393 396 | 
             
                //Javascript micro templating by John Resig - source at http://ejohn.org/blog/javascript-micro-templating/
         | 
| 394 397 | 
             
                template = helpers.template = function(templateString, valuesObject){
         | 
| 398 | 
            +
                  // If templateString is function rather than string-template - call the function for valuesObject
         | 
| 399 | 
            +
                  if(templateString instanceof Function)
         | 
| 400 | 
            +
                  {
         | 
| 401 | 
            +
                    return templateString(valuesObject);
         | 
| 402 | 
            +
                  }
         | 
| 403 | 
            +
             | 
| 395 404 | 
             
                  var cache = {};
         | 
| 396 405 | 
             
                  function tmpl(str, data){
         | 
| 397 406 | 
             
                    // Figure out if we're getting a template, or if we need to
         | 
| @@ -683,11 +692,17 @@ | |
| 683 692 | 
             
                    removeEvent(chartInstance.chart.canvas, eventName, handler);
         | 
| 684 693 | 
             
                  });
         | 
| 685 694 | 
             
                },
         | 
| 686 | 
            -
                 | 
| 695 | 
            +
                getMaximumWidth = helpers.getMaximumWidth = function(domNode){
         | 
| 687 696 | 
             
                  var container = domNode.parentNode;
         | 
| 688 697 | 
             
                  // TODO = check cross browser stuff with this.
         | 
| 689 698 | 
             
                  return container.clientWidth;
         | 
| 690 699 | 
             
                },
         | 
| 700 | 
            +
                getMaximumHeight = helpers.getMaximumHeight = function(domNode){
         | 
| 701 | 
            +
                  var container = domNode.parentNode;
         | 
| 702 | 
            +
                  // TODO = check cross browser stuff with this.
         | 
| 703 | 
            +
                  return container.clientHeight;
         | 
| 704 | 
            +
                },
         | 
| 705 | 
            +
                getMaximumSize = helpers.getMaximumSize = helpers.getMaximumWidth, // legacy support
         | 
| 691 706 | 
             
                retinaScale = helpers.retinaScale = function(chart){
         | 
| 692 707 | 
             
                  var ctx = chart.ctx,
         | 
| 693 708 | 
             
                    width = chart.canvas.width,
         | 
| @@ -766,8 +781,8 @@ | |
| 766 781 | 
             
                resize : function(callback){
         | 
| 767 782 | 
             
                  this.stop();
         | 
| 768 783 | 
             
                  var canvas = this.chart.canvas,
         | 
| 769 | 
            -
                    newWidth =  | 
| 770 | 
            -
                    newHeight = newWidth / this.chart.aspectRatio;
         | 
| 784 | 
            +
                    newWidth = getMaximumWidth(this.chart.canvas),
         | 
| 785 | 
            +
                    newHeight = this.options.maintainAspectRatio ? newWidth / this.chart.aspectRatio : getMaximumHeight(this.chart.canvas);
         | 
| 771 786 |  | 
| 772 787 | 
             
                  canvas.width = this.chart.width = newWidth;
         | 
| 773 788 | 
             
                  canvas.height =  this.chart.height = newHeight;
         | 
| @@ -1878,6 +1893,7 @@ | |
| 1878 1893 | 
             
              };
         | 
| 1879 1894 |  | 
| 1880 1895 | 
             
            }).call(this);
         | 
| 1896 | 
            +
             | 
| 1881 1897 | 
             
            (function(){
         | 
| 1882 1898 | 
             
              "use strict";
         | 
| 1883 1899 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: flashgrid-ext
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.2. | 
| 4 | 
            +
              version: 2.2.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Juan Gomez
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2014-07- | 
| 11 | 
            +
            date: 2014-07-29 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 86 86 | 
             
                  version: '0'
         | 
| 87 87 | 
             
            requirements: []
         | 
| 88 88 | 
             
            rubyforge_project: 
         | 
| 89 | 
            -
            rubygems_version: 2. | 
| 89 | 
            +
            rubygems_version: 2.4.1
         | 
| 90 90 | 
             
            signing_key: 
         | 
| 91 91 | 
             
            specification_version: 4
         | 
| 92 92 | 
             
            summary: Flashgrid Extensions
         |