-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it really work without prefix #33
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
/***/ (function(module, exports, __webpack_require__) { | ||
|
||
'use strict'; | ||
|
||
|
@@ -81,15 +81,15 @@ return /******/ (function(modules) { // webpackBootstrap | |
|
||
_leaflet2.default.VectorMarkers = _VectorMarkers3.default; | ||
|
||
/***/ }, | ||
/***/ }), | ||
/* 1 */ | ||
/***/ function(module, exports) { | ||
/***/ (function(module, exports) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'exports' is defined but never used. |
||
|
||
module.exports = __WEBPACK_EXTERNAL_MODULE_1__; | ||
|
||
/***/ }, | ||
/***/ }), | ||
/* 2 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
/***/ (function(module, exports, __webpack_require__) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Identifier 'webpack_require' is not in camel case. |
||
|
||
'use strict'; | ||
|
||
|
@@ -113,9 +113,9 @@ return /******/ (function(modules) { // webpackBootstrap | |
} | ||
}; | ||
|
||
/***/ }, | ||
/***/ }), | ||
/* 3 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
/***/ (function(module, exports, __webpack_require__) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Identifier 'webpack_require' is not in camel case. |
||
|
||
'use strict'; | ||
|
||
|
@@ -162,7 +162,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
function Icon(options) { | ||
_classCallCheck(this, Icon); | ||
|
||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Icon).call(this, options)); | ||
var _this = _possibleConstructorReturn(this, (Icon.__proto__ || Object.getPrototypeOf(Icon)).call(this, options)); | ||
|
||
_leaflet2.default.Util.setOptions(_this, iconOptions); | ||
_leaflet2.default.Util.setOptions(_this, options); | ||
|
@@ -200,14 +200,14 @@ return /******/ (function(modules) { // webpackBootstrap | |
var i = document.createElement('i'); | ||
var options = this.options; | ||
|
||
i.classList.add(options.prefix); | ||
if (options.extraClasses) { | ||
if (options.extraClasses && typeof options.extraClasses === 'string') { | ||
i.classList.add(options.extraClasses); | ||
} | ||
if (options.icon.slice(0, options.prefix.length + 1) === options.prefix + '-') { | ||
i.classList.add(options.icon); | ||
} else { | ||
if (options.prefix && typeof options.prefix === 'string') { | ||
i.classList.add(options.prefix + '-' + options.icon); | ||
i.classList.add(options.prefix); | ||
} else { | ||
i.classList.add(options.icon); | ||
} | ||
if (options.spin && typeof options.spinClass === 'string') { | ||
i.classList.add(options.spinClass); | ||
|
@@ -256,7 +256,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
|
||
exports.default = Icon; | ||
|
||
/***/ } | ||
/***/ }) | ||
/******/ ]) | ||
}); | ||
; | ||
; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ var Icon = function (_Leaflet$Icon) { | |
function Icon(options) { | ||
_classCallCheck(this, Icon); | ||
|
||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Icon).call(this, options)); | ||
var _this = _possibleConstructorReturn(this, (Icon.__proto__ || Object.getPrototypeOf(Icon)).call(this, options)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. |
||
|
||
_leaflet2.default.Util.setOptions(_this, iconOptions); | ||
_leaflet2.default.Util.setOptions(_this, options); | ||
|
@@ -81,14 +81,14 @@ var Icon = function (_Leaflet$Icon) { | |
var i = document.createElement('i'); | ||
var options = this.options; | ||
|
||
i.classList.add(options.prefix); | ||
if (options.extraClasses) { | ||
if (options.extraClasses && typeof options.extraClasses === 'string') { | ||
i.classList.add(options.extraClasses); | ||
} | ||
if (options.icon.slice(0, options.prefix.length + 1) === options.prefix + '-') { | ||
i.classList.add(options.icon); | ||
} else { | ||
if (options.prefix && typeof options.prefix === 'string') { | ||
i.classList.add(options.prefix + '-' + options.icon); | ||
i.classList.add(options.prefix); | ||
} else { | ||
i.classList.add(options.icon); | ||
} | ||
if (options.spin && typeof options.spinClass === 'string') { | ||
i.classList.add(options.spinClass); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,12 +53,12 @@ export default class Icon extends Leaflet.Icon { | |
const i = document.createElement('i') | ||
const options = this.options | ||
|
||
i.classList.add(options.prefix) | ||
if (options.extraClasses) { | ||
if (options.extraClasses && typeof options.extraClasses === 'string') { | ||
i.classList.add(options.extraClasses) | ||
} | ||
if (options.prefix) { | ||
if (options.prefix && typeof options.prefix === 'string') { | ||
i.classList.add(options.prefix + '-' + options.icon) | ||
i.classList.add(options.prefix) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing semicolon. |
||
} else { | ||
i.classList.add(options.icon) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier 'webpack_require' is not in camel case.
Wrapping non-IIFE function literals in parens is unnecessary.