Browse Source

fixed blured corpus map

Bachir Soussi Chiadmi 6 years ago
parent
commit
613ea5fc02

File diff suppressed because it is too large
+ 9 - 0
sites/all/modules/figli/edlp_corpus/assets/dist/scripts/corpus.min.js


File diff suppressed because it is too large
+ 22 - 0
sites/all/modules/figli/edlp_corpus/assets/dist/scripts/physics.min.js


File diff suppressed because it is too large
+ 0 - 0
sites/all/modules/figli/edlp_corpus/assets/dist/styles/corpus.min.css


+ 11 - 5
sites/all/modules/figli/edlp_corpus/assets/scripts/corpus.js

@@ -21,6 +21,7 @@
     var _activated = true;
     var _$body = $('body');
     var _$container = _$body;
+    var _dpi = window.devicePixelRatio;
     var _$canvas = $('<canvas id="corpus-map">').appendTo(_$container);
     var _canvas = _$canvas[0];
     var _ctx = _canvas.getContext('2d');
@@ -92,10 +93,15 @@
       onResizeCanvas();
     };
     function onResizeCanvas() {
-      _canvas.width = window.innerWidth;
-      _canvas.height = window.innerHeight;
-      for (var i = 0; i < _nodes.length; i++) {
-        _nodes[i].onResizeCanvas();
+
+      _canvas.width = window.innerWidth*_dpi;
+      _canvas.height = window.innerHeight*_dpi;
+
+
+      if(_nodes.length){
+        for (var i = 0; i < _nodes.length; i++) {
+          _nodes[i].onResizeCanvas();
+        }
         // move _attracter and _repulser to the center again
         resizePhysics();
       }
@@ -483,7 +489,7 @@
           // _ctx.fillStyle = _ecolors[this.e_color];
           // _ctx.fillRect(this.x - this.r,this.y - this.r,this.r*2,this.r*2);
           // ou carre contour
-          _ctx.lineWidth = '2px';
+          _ctx.lineWidth = 1.5;
           _ctx.fillStyle = 'rgb(255,255,255)';
           _ctx.fillRect(this.x - this.r,this.y - this.r,this.r*2,this.r*2);
           _ctx.strokeStyle = _ecolors[this.e_color];

File diff suppressed because it is too large
+ 1 - 0
sites/all/modules/figli/edlp_search/assets/dist/scripts/edlp_search.min.js


File diff suppressed because it is too large
+ 1 - 0
sites/all/modules/figli/edlp_studio/assets/dist/scripts/edlp_studio.min.js


+ 19 - 1
sites/all/themes/custom/edlptheme/assets/dist/scripts/history.min.js

@@ -1,2 +1,20 @@
+console.log('EDLP THEME HISTORY.js');
+// var edlp is provided by edlp_ajax.module file
+if(edlp.redirect){
+  console.log('history redirect', edlp);
+  console.log('window.location', window.location);
+  // window.localStorage.setItem('edlp_origin_path', edlp.sys_path.replace(/^\//, ''));
+  edlp.sys_path = edlp.sys_path.replace(/^\//, '');
 
-void 0;if(edlp.redirect){void 0;void 0;edlp.sys_path=edlp.sys_path.replace(/^\//,'');edlp.url=window.location.pathname;edlp.hash=window.location.hash;window.localStorage.setItem('edlp_origin',JSON.stringify(edlp));window.location.replace(window.location.origin+'/'+edlp.lang_code);}else{void 0;}
+  // window.localStorage.setItem('edlp_origin_url', window.location.pathname);
+  edlp.url = window.location.pathname;
+
+  // window.localStorage.setItem('edlp_origin_hash', window.location.hash);
+  edlp.hash = window.location.hash;
+
+  window.localStorage.setItem('edlp_origin', JSON.stringify(edlp));
+  // redirect to home
+  window.location.replace(window.location.origin+'/'+edlp.lang_code);
+}else{
+  console.log('history do not redirect');
+}

File diff suppressed because it is too large
+ 1 - 1
sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js


File diff suppressed because it is too large
+ 0 - 0
sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css


Some files were not shown because too many files changed in this diff