Skip to content

Commit

Permalink
Merge pull request #1224 from OpenGeoscience/cursor-annotation-mode
Browse files Browse the repository at this point in the history
feat: Add a cursor annotation mode.
  • Loading branch information
manthey authored Jun 22, 2022
2 parents b38085f + 99952f4 commit 4deaf91
Show file tree
Hide file tree
Showing 14 changed files with 772 additions and 419 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# GeoJS Change Log

## Version 1.10.0

### Features

- Add a cursor annotation mode ([#1224](../../pull/1224))

## Version 1.9.4

### Improvements

- Update on meta key changes ([#1221](../../pull/1221))

### Bug Fixes

- Fix determining annotation correspondence ([#1223](../../pull/1223))

## Version 1.9.3

### Improvements

- Speed up track feature ([#1220](../../pull/1220))

## Version 1.9.2

### Bug Fixes
Expand Down
13 changes: 11 additions & 2 deletions examples/annotations/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ block append mainContent
.form-group.annotationtype(title='Select the type of annotation to add.')
.shortlabel Add
button#rectangle.lastused(next='square') Rectangle
button#square.lastused(next='ellipse') Square
button#square(next='ellipse') Square
button#ellipse(next='circle') Ellipse
button#circle(next='polygon') Circle
button#polygon(next='point') Polygon
Expand All @@ -21,12 +21,21 @@ block append mainContent
.annotation.circle Left click-and-drag or left click opposite corners to draw a circle.
.annotation.point Left click to create a point.
.annotation.line Left-click points in the line. Double click, right click, or click the starting point to end the line.
.form-group(title='If enabled, left-click to add another annotation, and right-click to switch annotation type. Otherwise, you must click a button above.')
.form-group(title='If "Add New", left-click to add another annotation, and right-click to switch annotation type. Otherwise, you must click a button above.')
label(for='clickmode') Click mode
select#clickmode(param-name='clickmode', placeholder='edit')
option(value='edit') Select and Edit
option(value='add') Add New
option(value='none') None
option(value='brush') Brush Mode

.form-group.compact(title='In Brush Mode, specify the brush shape and size in meters.')
label(for='brushshape') Brush Shape
select#brushshape(param-name='brushshape', placeholder='square')
option(value='square') Square
option(value='circle') Circle
label(for='brushsize') Size (m)
input#brushsize(param-name='brushsize', type='range', min=10, max=100000, value=5000)
.form-group(title='If enabled, immediately after adding one annotation, you can add another without either left-clicking or selecting a button.')
label(for='keepadding') Keep adding annotations
input#keepadding(param-name='keepadding', type='checkbox', placeholder='false')
Expand Down
13 changes: 13 additions & 0 deletions examples/annotations/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@
color: #333;
cursor: pointer;
}
#controls .form-group.compact label {
min-width: 0px;
padding-right: 5px;
}
#controls .form-group.compact select {
padding-right: 10px;
}
#controls .form-group.compact input[type="range"] {
width: 120px;
display: inline-block;
vertical-align: middle;
}

.entry span, .entry a {
display: inline-block;
}
Expand Down
Loading

0 comments on commit 4deaf91

Please sign in to comment.