Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
Upgrade and refactoring
Browse files Browse the repository at this point in the history
+ changed return value of getContent method and content property - return single Element
+ add basic test
+ setup Travis CI pipeline
+ add Idea shared files to git
+ add source maps export
+ Update README
+ fix typos in doc comments
  • Loading branch information
ghettovoice committed Oct 30, 2016
1 parent 007983a commit 3f9849d
Show file tree
Hide file tree
Showing 31 changed files with 737 additions and 365 deletions.
11 changes: 11 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": [
"es2015",
"stage-0"
],
"plugins": [
"transform-flow-strip-types",
"transform-function-bind",
"add-module-exports"
]
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

[*.json]
[{*.json,*.yml,*.yaml,.babelrc}]
indent_size=2
102 changes: 98 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,99 @@
.idea
*.iml
### Custom


### Linux template
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml

# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Gradle:
.idea/gradle.xml
.idea/libraries

# Mongo Explorer plugin:
.idea/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### Node template
node_modules
npm-debug.log
/esdoc
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/watcherTasks.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
branches:
only:
- master
language: node_js
node_js:
- 6
cache:
directories:
- node_modules
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Build Status](https://travis-ci.org/ghettovoice/ol3-popup-umd.svg?branch=master)](https://travis-ci.org/ghettovoice/ol3-popup-umd)
[![view on npm](http://img.shields.io/npm/v/ol3-popup-umd.svg)](https://www.npmjs.org/package/ol3-popup-umd)

# ol3-popup-umd
Expand Down Expand Up @@ -45,12 +46,12 @@ Click on the map to display a popup, click close to the edge of the map to see i

**Properties**

| Name | Type | Description |
|------|------|-------------|
| Name | Type | Description |
|:------|:------|:-------------|
| **id** | *number | string | undefined* | Set the overlay id. The overlay id can be used with the `ol.Map#getOverlayById` method. |
| **offset** | *number[] | undefined* | Offsets in pixels used when positioning the overlay. The first element in the array is the horizontal offset. A positive value shifts the overlay right. The second element in the array is the vertical offset. A positive value shifts the overlay down. Default is `[0, 0]`. |
| **position** | *ol.Coordinate | undefined* | The overlay position in map projection. |
| **positioning** | *ol.OverlayPositioning | string | undefined* | Defines how the overlay is actually positioned with respect to its position property. Possible values are `bottom-left`, `bottom-center`, `bottom-right`, `center-left`, `center-center`, `center-right`, `top-left`, `top-center`, and `top-right`. Default is `top-left`. |
| **positioning** | *ol.Overlay.Positioning | string | undefined* | Defines how the overlay is actually positioned with respect to its position property. Possible values are `bottom-left`, `bottom-center`, `bottom-right`, `center-left`, `center-center`, `center-right`, `top-left`, `top-center`, and `top-right`. Default is `top-left`. |
| **stopEvent** | *boolean | undefined* | Whether event propagation to the map viewport should be stopped. Default is `true`. If true the overlay is placed in the same container as that of the controls (CSS class name `ol-overlaycontainer-stopevent`); if false it is placed in the container with CSS class name `ol-overlaycontainer`. |
| **insertFirst** | *boolean | undefined* | Whether the overlay is inserted first in the overlay container, or appended. Default is `true`. If the overlay is placed in the same container as that of the controls (see the `stopEvent` option) you will probably set `insertFirst` to true so the overlay is displayed below the controls. |
| **autoPan** | *boolean | undefined* | If set to `true` the map is panned when calling `setPosition`, so that the overlay is entirely visible in the current viewport. The default is `true`. |
Expand All @@ -75,16 +76,16 @@ Click on the map to display a popup, click close to the edge of the map to see i

**Params:**

| Name | Type | Description |
|------|------|-------------|
| Name | Type | Description |
|:------|:------|:-------------|
| **options** | *PopupOptions* | Popup options. |


#### Members

set **content** : *HTMLCollection*

get **content** : *HTMLCollection*
get **content** : *Element*


#### Methods
Expand All @@ -97,8 +98,8 @@ get **content** : *HTMLCollection*

**Params:**

| Name | Type | Description |
|------|------|-------------|
| Name | Type | Description |
|:------|:------|:-------------|
| **content** | *Element | HTMLCollection | string* | Update popup inner content. |


Expand All @@ -110,15 +111,15 @@ get **content** : *HTMLCollection*
---------


**getContent**() : *HTMLCollection*
**getContent**() : *Element*





**Returns:**

HTMLCollection - Inner content of popup.
Element - Inner content of popup.



Expand All @@ -132,8 +133,8 @@ HTMLCollection - Inner content of popup.

**Params:**

| Name | Type | Description |
|------|------|-------------|
| Name | Type | Description |
|:------|:------|:-------------|
| **map** | *ol.Map* | OpenLayers map object. |


Expand Down Expand Up @@ -163,8 +164,8 @@ Shows popup.

**Params:**

| Name | Type | Description |
|------|------|-------------|
| Name | Type | Description |
|:------|:------|:-------------|
| **coordinate** | *ol.Coordinate* | New popup position. |
| **content** | *Element | HTMLCollection | string* | Replace inner content. |

Expand Down
Loading

0 comments on commit 3f9849d

Please sign in to comment.