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
1c10637a
Commit
1c10637a
authored
Feb 15, 2015
by
hertzhaft
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added Proportion shape (LineString with only 3 vertices)
parent
3b4e2348
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
webapp/src/main/webapp/jquery/jquery.digilib.measure.js
webapp/src/main/webapp/jquery/jquery.digilib.measure.js
+19
-2
webapp/src/main/webapp/jquery/jquery.digilib.vector.js
webapp/src/main/webapp/jquery/jquery.digilib.vector.js
+1
-1
No files found.
webapp/src/main/webapp/jquery/jquery.digilib.measure.js
View file @
1c10637a
...
...
@@ -710,12 +710,14 @@
// color of selected objects
selectColor
:
'
red
'
,
// implemented measuring shape types, for select widget
implementedShapes
:
[
'
Line
'
,
'
LineString
'
,
'
Rectangle
'
,
'
Polygon
'
,
'
Circle
'
,
'
Ellipse
'
],
implementedShapes
:
[
'
Line
'
,
'
LineString
'
,
'
Proportion
'
,
'
Rectangle
'
,
'
Polygon
'
,
'
Circle
'
,
'
Ellipse
'
],
// all measuring shape types
shapeInfo
:
{
Line
:
{
name
:
'
line
'
,
display
:
'
length
'
,
},
LineString
:
{
name
:
'
linestring
'
,
display
:
'
length
'
},
Rectangle
:
{
name
:
'
rectangle
'
,
display
:
'
area
'
},
Proportion
:
{
name
:
'
proportion
'
,
display
:
'
length
'
},
Rectangle
:
{
name
:
'
box
'
,
display
:
'
area
'
},
Rect
:
{
name
:
'
rectangle
'
,
display
:
'
area
'
},
Square
:
{
name
:
'
square
'
,
display
:
'
length
'
},
Polygon
:
{
name
:
'
polygon
'
,
display
:
'
area
'
},
Circle
:
{
name
:
'
circle
'
,
display
:
'
radius
'
},
...
...
@@ -1170,6 +1172,20 @@
keystate
=
{};
};
// set up additional SVG shapes
var
setupSvgFactory
=
function
(
data
)
{
var
factory
=
data
.
svgFactory
;
if
(
factory
==
null
)
{
console
.
error
(
"
No SVG factory found: jquery.digilib.vector not loaded?
"
);
return
;
}
factory
[
'
Proportion
'
]
=
function
(
shape
)
{
var
$s
=
factory
[
'
LineString
'
](
shape
);
shape
.
properties
.
maxvtx
=
3
;
return
$s
;
}
};
// set up a div for accessing the measuring functionality
var
setupMeasureBar
=
function
(
data
)
{
console
.
debug
(
'
measure: setupMeasureBar
'
);
...
...
@@ -1240,6 +1256,7 @@
data
.
lastMeasuredAngle
=
0
;
data
.
measureFactor
=
1.0
,
setupMeasureBar
(
data
);
setupSvgFactory
(
data
);
};
// event handler for scaler update
...
...
webapp/src/main/webapp/jquery/jquery.digilib.vector.js
View file @
1c10637a
...
...
@@ -518,7 +518,7 @@
return
;
}
var
shapeType
=
shape
.
geometry
.
type
;
if
(
!
isSupported
(
shapeType
))
{
if
(
!
isSupported
(
data
,
shapeType
))
{
console
.
error
(
"
renderShape: unsupported shape type:
"
+
shapeType
);
return
;
}
...
...
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