Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
digilib-pivaj
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Daniel ANTELME
digilib-pivaj
Commits
329762b4
Commit
329762b4
authored
10 years ago
by
hertzhaft
Browse files
Options
Downloads
Patches
Plain Diff
show construction lines; todo list for measure plugin
parent
f6da6a9f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
webapp/src/main/webapp/jquery/jquery.digilib.measure.css
+6
-0
6 additions, 0 deletions
webapp/src/main/webapp/jquery/jquery.digilib.measure.css
webapp/src/main/webapp/jquery/jquery.digilib.measure.js
+17
-3
17 additions, 3 deletions
webapp/src/main/webapp/jquery/jquery.digilib.measure.js
with
23 additions
and
3 deletions
webapp/src/main/webapp/jquery/jquery.digilib.measure.css
+
6
−
0
View file @
329762b4
...
...
@@ -106,3 +106,9 @@ img#dl-measure-move {
fill
:
none
;
}
.dl-measure-constr
{
stroke
:
cornsilk
;
stroke-dasharray
:
3
3
;
fill
:
none
;
}
This diff is collapsed.
Click to expand it.
webapp/src/main/webapp/jquery/jquery.digilib.measure.js
+
17
−
3
View file @
329762b4
...
...
@@ -27,6 +27,19 @@
/* jslint browser: true, debug: true, forin: true
*/
/* TODO:
- infowindow for shapes
- display fractions
- display angles
- display Vitruvian intercolumnium types
- display shapes overlay? (angles, distances?)
- move shapes (shift+drag?)
- confine oval to sensible measurements
- better grid
- snap vertex to next "round" unit / sub-unit while dragging (on keypress?)
*/
(
function
(
$
)
{
// the digilib object
...
...
@@ -1214,6 +1227,7 @@
var
props
=
shape
.
properties
;
var
place
=
$s
.
place
;
var
guide
=
CSS
+
'
measure-guide
'
;
var
constr
=
CSS
+
'
measure-constr
'
;
$s
.
attr
({
'
class
'
:
guide
});
props
.
maxvtx
=
4
;
var
$g
=
$
(
fn
.
svgElement
(
'
g
'
,
{
'
id
'
:
shape
.
id
+
'
-oval
'
}));
...
...
@@ -1221,8 +1235,8 @@
var
$c2
=
$
(
fn
.
svgElement
(
'
circle
'
,
{
'
id
'
:
shape
.
id
+
'
-circ2
'
,
'
class
'
:
guide
}));
var
$p1
=
$
(
fn
.
svgElement
(
'
path
'
,
{
'
id
'
:
shape
.
id
+
'
-lines
'
,
'
class
'
:
guide
}));
var
$p2
=
$
(
fn
.
svgElement
(
'
path
'
,
{
'
id
'
:
shape
.
id
+
'
-arc
'
,
stroke
:
props
.
stroke
,
fill
:
'
none
'
}));
//
var $p3 = $(fn.svgElement('path',
{stroke: 'yellow', fill: 'none'
})); // debug construction
$g
.
append
(
$s
).
append
(
$c1
).
append
(
$c2
).
append
(
$p1
).
append
(
$p2
);
var
$p3
=
$
(
fn
.
svgElement
(
'
path
'
,
{
'
id
'
:
shape
.
id
+
'
-constr
'
,
'
class
'
:
constr
}));
// debug construction
$g
.
append
(
$s
).
append
(
$c1
).
append
(
$c2
).
append
(
$p1
).
append
(
$p2
)
.
append
(
$p3
)
;
$g
.
place
=
function
()
{
var
p
=
props
.
screenpos
;
place
.
call
(
$s
);
// place the framing rectangle (polygon)
...
...
@@ -1265,7 +1279,7 @@
'
A
'
+
rad1
+
'
,
'
+
rad1
+
'
0 0,1
'
+
fp3
+
'
A
'
+
rad2
+
'
,
'
+
rad2
+
'
0 0,1
'
+
fp4
+
'
A
'
+
rad1
+
'
,
'
+
rad1
+
'
0 0,1
'
+
fp2
});
//
$p3.attr({d:
'M'+p[3]+' L'+m1+
'M'+rd+' L'+m1+' '+md+' '+m3}); // debug construction
$p3
.
attr
({
d
:
'
M
'
+
rd
+
'
L
'
+
m1
+
'
M
'
+
md
+
'
'
+
m3
});
// debug construction
p
[
3
]
=
handle
;
shape
.
geometry
.
coordinates
[
3
]
=
trafo
.
invtransform
(
handle
).
toArray
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment