Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
6f5e2b9e
Commit
6f5e2b9e
authored
Sep 20, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
annotation: clarify internal comments
parent
ce9e9de3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
highlight.js
annotations/static/annotations/highlight.js
+11
-17
No files found.
annotations/static/annotations/highlight.js
View file @
6f5e2b9e
...
...
@@ -70,21 +70,15 @@
}
return
false
;
}
// we only need one singleton at a time
// (<=> is only called once per doc, but value of annotation changes)
var
selection
=
getSelected
();
/*
* When mouse selection was started, this used to grey out the text panel
*/
// function toggleSelectionChangePanelClass(text) {
// // if (text.trim() !== "" && !$element.hasClass('menu-is-opened')) {
// if (text.trim() !== "" && !$element.hasClass('menu-is-opened')) {
// $(".text-panel").addClass("selection");
// } else {
// $(".text-panel").removeClass("selection");
// }
// }
// £TODO extend "double click selection" on hyphen words
// and reduce it on apostrophe ones (except firefox)
// cf. stackoverflow.com/a/39005881/2489184
// jsfiddle.net/avvhsruu/
// we only need one singleton at a time
// (<=> is only created once per doc, but value of annotation changes)
var
selectionObj
=
getSelected
();
/*
* Dynamically construct the selection menu scope
...
...
@@ -261,7 +255,7 @@
// console.warn("FADE IN menu", $element)
}
else
{
console
.
warn
(
"=> else"
)
//
console.warn("=> else")
// close the menu
$scope
.
menuItems
=
[];
...
...
@@ -293,7 +287,7 @@
});
/*
* Toggle the menu when clicking on an existing ngram
keyword
* Toggle the menu when clicking on an existing ngram
or a free selection
*/
$
(
".text-container"
).
mouseup
(
function
(
e
){
$
(
".text-container"
).
unbind
(
"mousemove"
,
positionMenu
);
...
...
@@ -301,7 +295,7 @@
positionMenu
(
e
);
// console.warn("calling toggleMenu from *mouseup*")
toggleMenu
(
null
,
selection
.
toString
().
trim
());
toggleMenu
(
null
,
selection
Obj
.
toString
().
trim
());
});
$rootScope
.
$on
(
"positionAnnotationMenu"
,
positionElement
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment