@@ -37,7 +37,7 @@ function clusterCategoryIdToText(clusterCategoryId) {
3737}
3838
3939function clusterCategoryPalette ( ) {
40- const alpha = 0.75 ;
40+ const alpha = 1.0 ;
4141 return [
4242 [ 0.875 , 0.125 , 0.125 , alpha ] ,
4343 [ 0.875 , 0.5341 , 0.125 , alpha ] ,
@@ -262,13 +262,6 @@ function onClick(x, y) {
262262 disableArticle ( ) ;
263263 } else {
264264 enableArticle ( closestPoint ) ;
265-
266- const article = document . getElementById ( "article" ) ;
267- article . innerHTML =
268- "<iframe src='https://sciencemap.eto.tech/cluster/?version=2&cluster_id=" +
269- closestPoint . clusterId +
270- "' width='100%' height='100%'></iframe>" ;
271-
272265 // window.open(
273266 // "https://sciencemap.eto.tech/cluster/?version=2&cluster_id=" +
274267 // closestPoint.clusterId,
@@ -357,7 +350,25 @@ function disableAnnotation() {
357350 isAnnotationEnabled = false ;
358351}
359352
360- function buildArticle ( dataPoint ) { }
353+ function buildArticle ( dataPoint ) {
354+ const article = document . getElementById ( "article-content" ) ;
355+ const url =
356+ "https://sciencemap.eto.tech/cluster/?version=2&cluster_id=" +
357+ dataPoint . clusterId ;
358+
359+ article . innerHTML =
360+ "<iframe src='" + url + "' width='100%' height='100%'></iframe>" ;
361+
362+ const articleClose = document . getElementById ( "article-close" ) ;
363+ articleClose . onclick = ( ) => {
364+ disableArticle ( ) ;
365+ } ;
366+
367+ const articleOpen = document . getElementById ( "article-open" ) ;
368+ articleOpen . onclick = ( ) => {
369+ window . open ( url , "_blank" ) ;
370+ } ;
371+ }
361372
362373function disableArticle ( ) {
363374 const article = document . getElementById ( "article" ) ;
0 commit comments