Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
digilib-pivaj
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Daniel ANTELME
digilib-pivaj
Commits
8b34e2bb
Commit
8b34e2bb
authored
Feb 03, 2015
by
hertzhaft
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
select/unselect shapes
parent
5d8f91cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
+30
-5
webapp/src/main/webapp/jquery/jquery.digilib.measure.css
webapp/src/main/webapp/jquery/jquery.digilib.measure.css
+6
-2
webapp/src/main/webapp/jquery/jquery.digilib.measure.js
webapp/src/main/webapp/jquery/jquery.digilib.measure.js
+24
-3
No files found.
webapp/src/main/webapp/jquery/jquery.digilib.measure.css
View file @
8b34e2bb
...
...
@@ -88,10 +88,14 @@ img#dl-measure-move {
margin
:
0px
4px
4px
0px
;
}
.dl-measure-
item
{
.dl-measure-
shape
{
pointer-events
:
visibleStroke
;
}
.dl-measure-
item
:hover
{
.dl-measure-
shape
:hover
{
stroke
:
lightcyan
;
}
.dl-measure-selected
{
stroke
:
cyan
;
}
webapp/src/main/webapp/jquery/jquery.digilib.measure.js
View file @
8b34e2bb
...
...
@@ -820,6 +820,7 @@
var
onRenderShape
=
function
(
event
,
shape
)
{
// event handler for updating shape info
var
info
=
function
(
event
)
{
selectShape
(
data
,
shape
);
updateInfo
(
data
,
shape
);
_debug_shape
(
'
onClick
'
,
shape
);
};
...
...
@@ -916,17 +917,37 @@
updateCalculation
(
data
);
};
// select/unselect shape
var
selectShape
=
function
(
data
,
shape
,
select
)
{
var
css
=
CSS
+
'
measure-selected
'
;
if
(
select
==
null
)
{
select
=
!
shape
.
properties
.
selected
}
var
cssclass
=
shapeClass
(
shape
.
geometry
.
type
,
select
?
css
:
null
)
shape
.
$elem
.
attr
(
"
class
"
,
cssclass
);
shape
.
properties
.
cssclass
=
cssclass
;
shape
.
properties
.
selected
=
select
;
};
// construct CSS class for svg shape
var
shapeClass
=
function
(
shapeType
,
more
)
{
var
css
=
CSS
+
'
measure-shape
'
+
CSS
+
'
measure-
'
+
shapeType
;
if
(
more
!=
null
)
{
css
+=
'
'
+
more
};
return
css
;
};
// return a shape of the currently selected shape type
var
newShape
=
function
(
data
)
{
var
shapeType
=
getActiveShapeType
(
data
);
return
{
geometry
:
{
type
:
getActiveShapeType
(
data
)
type
:
shapeType
},
properties
:
{
stroke
:
getSelectedStroke
(
data
),
editable
:
true
,
cssclass
:
'
dl-measure-item
'
,
center
:
data
.
settings
.
drawFromCenter
cssclass
:
shapeClass
(
shapeType
),
center
:
data
.
settings
.
drawFromCenter
,
selected
:
false
}
};
};
...
...
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