Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. decoupageInstance = new Decoupage(cartovista, map);
  2.  
  3. define(['jquery', 'spectrum', 'PencilTool'], function($, spectrum, PencilTool) {
  4.  
  5. var StatisticEnum = require('cartovista/viewer/data/StatisticEnum');
  6. var RGBA = require('cartovista/viewer/util/RGBA');
  7. var IndividualValue = require('cartovista/viewer/thematics/IndividualValue');
  8. var RepresentationEnum = require('cartovista/viewer/thematics/RepresentationEnum');
  9.  
  10. var Decoupage = function(cartovista,map){
  11. this._initPanelSecteurs();
  12. }
  13.  
  14. Decoupage.prototype._initPanelSecteurs = function(){
  15. var decoupage = this;
  16. decoupage._getCodeSecteursList();
  17. decoupage._createTableRows();
  18. }
  19.  
  20. Decoupage.prototype._getCodeSecteursList = function(dbxEvent){
  21. var codeSecteurList = [];
  22. for (var i=0; i < this._pointsTheme._colorTheme._individualValues.length ; i++){
  23. codeSecteurList.push(this._pointsTheme._colorTheme._individualValues[i]._value);
  24. }
  25. this._codeSecteurList = codeSecteurList;
  26. //returns 11 but is called after decoupage._createTableRows() in Chrome and IE
  27. console.log(this._codeSecteurList.length);
  28. }
  29.  
  30. Decoupage.prototype._createTableRows = function(){
  31. //returns 0 in Chrome and IE but returns 11 in Firefox
  32. console.log("codeSecteur length: " + this._codeSecteurList.length);
  33. }
  34.  
  35.  
  36. return Decoupage;
  37. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement