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

Commit

Permalink
Fixed default leaflet image asset paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebronner committed Aug 17, 2020
1 parent 4c5c5bf commit 2cb03c3
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2020-08-17
### Fixed
- paths for default leaflet image assets.

## [0.1.16] - 2020-04-06
### Added
- event listener to trigger recentering of the map. Thanks @angelformica!
Expand Down
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

Binary file added dist/vendor/leaflet/dist/images/layers-2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/vendor/leaflet/dist/images/layers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/vendor/leaflet/dist/images/marker-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/vendor/leaflet/dist/images/marker-shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions resources/js/components/FormField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
data: function () {
return {
iconRetina: this.field.iconRetinaUrl
|| require('leaflet/dist/images/marker-icon-2x.png'),
|| '/vendor/leaflet/dist/images/marker-icon-2x.png',
icon: this.field.iconUrl
|| require('leaflet/dist/images/marker-icon.png'),
|| '/vendor/leaflet/dist/images/marker-icon.png',
shadow: this.field.shadowUrl
|| require('leaflet/dist/images/marker-shadow.png'),
|| '/vendor/leaflet/dist/images/marker-shadow.png',
defaultLatitude: this.field.defaultLatitude
|| 0,
defaultLongitude: this.field.defaultLongitude
Expand All @@ -50,7 +50,7 @@
},
};
},
mounted: function () {
this.$nextTick(() => {
this.map = this.$refs.map.mapObject;
Expand All @@ -71,7 +71,7 @@
if (typeof this.field.searchProviderKey !== 'undefined') {
providerOptions.params.key = this.field.searchProviderKey;
}
switch (this.field.searchProvider) {
case "bing":
this.geosearchOptions.provider = new BingProvider(providerOptions);
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Service extends ServiceProvider
public function boot()
{
$this->publishes([
__DIR__ . '/../../dist/images' => public_path('images'),
__DIR__ . '/../../dist/vendor' => public_path('vendor'),
], 'assets');

Nova::serving(function (ServingNova $event) {
Expand Down
2 changes: 1 addition & 1 deletion webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ mix
.setPublicPath('dist')
.js('resources/js/field.js', 'js')
.sass('resources/sass/field.scss', 'css')
.copy("./node_modules/leaflet/dist/images", "images")
.copy("./node_modules/leaflet/dist/images", "dist/vendor/leaflet/dist/images")
;

0 comments on commit 2cb03c3

Please sign in to comment.