Guest User

Untitled

a guest
Jan 18th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. var newArray = new Array();
  2. for(var i=0;i<fileUrls.length;++i) {
  3. var url = fileUrls[i];
  4. var x = [];//new Array();
  5. x = [url,
  6. function(){
  7. displayFile(url, 'image', null, ft_id, null, null, null, null, !MA.isiOS());
  8. },
  9. function(e){
  10. if(DEBUG) console.log('Error creating gallery thumbnail');
  11. alert('There was a problem creating a thumbnail');
  12. MA.hideMessage();
  13. }
  14. ];
  15. newArray.push(x);
  16. }
  17. pollingThrottler(2,newArray, function(a,b,c){
  18. //alert(a+"n-----n"+b+"n-----n"+c);
  19. //alert(bentleyPlugins.createThumbnailForPath(a,b,c));
  20. //alert(a);
  21. //a does not reference the correct item.
  22. createThumbnailForPath(a,b,c);
  23. return;
  24. },function(){
  25. alert("success!");
  26. });
  27.  
  28. function genElement( url ) {
  29. return [url,
  30. function(){
  31. displayFile(url, 'image', null, ft_id, null, null, null, null, !MA.isiOS());
  32. },
  33. function(e){
  34. if(DEBUG) console.log('Error creating gallery thumbnail');
  35. alert('There was a problem creating a thumbnail');
  36. MA.hideMessage();
  37. }
  38. ];
  39. }
  40. arrayList.push( genElement( myUrl ) );
  41.  
  42. function Thing(url) {
  43. this.url = url;
  44. }
  45. Thing.prototype.display = function(){
  46. displayFile(this.url, 'image', null, ft_id, null, null, null, null, !MA.isiOS());
  47. };
  48. Thing.prototype.doSomething = function(){
  49. if(DEBUG) console.log('Error creating gallery thumbnail');
  50. alert('There was a problem creating a thumbnail');
  51. MA.hideMessage();
  52. };
  53.  
  54. arrayList.push(new Thing(url));
  55.  
  56. Thing.prototype.asArray = function(){
  57. var _this = this;
  58. return [this.url, function(){_this.display()}, this.doSomething];
  59. }
Add Comment
Please, Sign In to add comment