hover sostituito con click (in progress)
This commit is contained in:
parent
fa5a587f61
commit
c4025c48a0
|
@ -26,6 +26,7 @@ $(document).ready(function() {
|
||||||
var minimapScrolling = false;
|
var minimapScrolling = false;
|
||||||
var displayId = 'displaycanto'
|
var displayId = 'displaycanto'
|
||||||
var minimapTopPos;
|
var minimapTopPos;
|
||||||
|
|
||||||
//used in minimap
|
//used in minimap
|
||||||
//
|
//
|
||||||
let minimap = document.createElement('div');
|
let minimap = document.createElement('div');
|
||||||
|
@ -56,11 +57,8 @@ $(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
$("[data-cg]").hover(function() {
|
$("[data-cg]").hover(function() {
|
||||||
//var properties = $(this).data("cg").split("");
|
|
||||||
//var cg = properties[0];
|
|
||||||
//$(this).popover({title: "Proprietà", content: categoriegrammaticali[cg], trigger: "hover"});
|
|
||||||
var details=getHoverContent($(this).data("cg"))
|
var details=getHoverContent($(this).data("cg"))
|
||||||
$(this).popover({title: "Proprietà", content: details, trigger: "hover"});
|
$(this).popover({title: "Proprietà", content: details, trigger: "click"});
|
||||||
});
|
});
|
||||||
|
|
||||||
var mmih = 0
|
var mmih = 0
|
||||||
|
@ -129,19 +127,13 @@ $(document).ready(function() {
|
||||||
return categoriegrammaticali[mycat.join('-')]
|
return categoriegrammaticali[mycat.join('-')]
|
||||||
}
|
}
|
||||||
if (categ[0]=='v'){
|
if (categ[0]=='v'){
|
||||||
var parser = peg.generate(categoriegrammaticaliGrammar);
|
return parserVerbi.parse(categ).split(',').filter(prop => prop.length > 0).join()
|
||||||
//console.log (parser.parse(categ).split(',').filter(prop => prop.length > 0).join())
|
|
||||||
return parser.parse(categ).split(',').filter(prop => prop.length > 0).join()
|
|
||||||
}
|
}
|
||||||
if(categ[0]=='s'){
|
if(categ[0]=='s'){
|
||||||
var parser = peg.generate(categoriaGrammaticaleSostantivo);
|
return parserSostantivi.parse(categ).split(',').filter(prop => prop.length > 0).join()
|
||||||
//console.log (parser.parse(categ).split(',').filter(prop => prop.length > 0).join())
|
|
||||||
return parser.parse(categ).split(',').filter(prop => prop.length > 0).join()
|
|
||||||
}
|
}
|
||||||
if(categ[0]=='e'){
|
if(categ[0]=='e'){
|
||||||
var parser = peg.generate(categoriaGrammaticalePreposizione);
|
return parserPreposizioni.parse(categ).split(',').filter(prop => prop.length > 0).join()
|
||||||
//console.log (parser.parse(categ).split(',').filter(prop => prop.length > 0).join())
|
|
||||||
return parser.parse(categ).split(',').filter(prop => prop.length > 0).join()
|
|
||||||
}
|
}
|
||||||
//console.log(categ[0])
|
//console.log(categ[0])
|
||||||
return categoriegrammaticali[categ[0]]
|
return categoriegrammaticali[categ[0]]
|
||||||
|
@ -728,5 +720,10 @@ complemento2=
|
||||||
"k14" {return(" Di Rapporto")}
|
"k14" {return(" Di Rapporto")}
|
||||||
|
|
||||||
`
|
`
|
||||||
|
//parser per categorie
|
||||||
|
var parserVerbi = peg.generate(categoriegrammaticaliGrammar);
|
||||||
|
var parserSostantivi = peg.generate(categoriaGrammaticaleSostantivo);
|
||||||
|
var parserPreposizioni = peg.generate(categoriaGrammaticalePreposizione);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue