Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Commit 2cb03c3

Browse files
committed
Fixed default leaflet image asset paths.
1 parent 4c5c5bf commit 2cb03c3

File tree

10 files changed

+12
-8
lines changed

10 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.2.0] - 2020-08-17
8+
### Fixed
9+
- paths for default leaflet image assets.
10+
711
## [0.1.16] - 2020-04-06
812
### Added
913
- event listener to trigger recentering of the map. Thanks @angelformica!

dist/js/field.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
1.23 KB
Loading
696 Bytes
Loading
2.41 KB
Loading
1.43 KB
Loading
618 Bytes
Loading

resources/js/components/FormField.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
data: function () {
2222
return {
2323
iconRetina: this.field.iconRetinaUrl
24-
|| require('leaflet/dist/images/marker-icon-2x.png'),
24+
|| '/vendor/leaflet/dist/images/marker-icon-2x.png',
2525
icon: this.field.iconUrl
26-
|| require('leaflet/dist/images/marker-icon.png'),
26+
|| '/vendor/leaflet/dist/images/marker-icon.png',
2727
shadow: this.field.shadowUrl
28-
|| require('leaflet/dist/images/marker-shadow.png'),
28+
|| '/vendor/leaflet/dist/images/marker-shadow.png',
2929
defaultLatitude: this.field.defaultLatitude
3030
|| 0,
3131
defaultLongitude: this.field.defaultLongitude
@@ -50,7 +50,7 @@
5050
},
5151
};
5252
},
53-
53+
5454
mounted: function () {
5555
this.$nextTick(() => {
5656
this.map = this.$refs.map.mapObject;
@@ -71,7 +71,7 @@
7171
if (typeof this.field.searchProviderKey !== 'undefined') {
7272
providerOptions.params.key = this.field.searchProviderKey;
7373
}
74-
74+
7575
switch (this.field.searchProvider) {
7676
case "bing":
7777
this.geosearchOptions.provider = new BingProvider(providerOptions);

src/Providers/Service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Service extends ServiceProvider
99
public function boot()
1010
{
1111
$this->publishes([
12-
__DIR__ . '/../../dist/images' => public_path('images'),
12+
__DIR__ . '/../../dist/vendor' => public_path('vendor'),
1313
], 'assets');
1414

1515
Nova::serving(function (ServingNova $event) {

webpack.mix.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ mix
44
.setPublicPath('dist')
55
.js('resources/js/field.js', 'js')
66
.sass('resources/sass/field.scss', 'css')
7-
.copy("./node_modules/leaflet/dist/images", "images")
7+
.copy("./node_modules/leaflet/dist/images", "dist/vendor/leaflet/dist/images")
88
;

0 commit comments

Comments
 (0)