use [].concat, not Ox.merge
This commit is contained in:
parent
36d0162b8b
commit
1c40fb007b
27 changed files with 87 additions and 90 deletions
|
|
@ -473,7 +473,7 @@ Ox.ListMap = function(options, self) {
|
|||
self.$placeData = Ox.Element();
|
||||
|
||||
self.$placeForm = Ox.Form({
|
||||
items: Ox.merge([
|
||||
items: [].concat([
|
||||
self.$nameInput = Ox.Input({
|
||||
id: 'name',
|
||||
label: 'Name',
|
||||
|
|
@ -1043,7 +1043,7 @@ Ox.ListMap = function(options, self) {
|
|||
showForm(place);
|
||||
if (self.options.hasMatches) {
|
||||
self.$matchesInput.value('').show();
|
||||
names = Ox.filter(Ox.merge([place.name], place.alternativeNames), function(name) {
|
||||
names = Ox.filter([place.name].concat(place.alternativeNames), function(name) {
|
||||
return name !== '';
|
||||
});
|
||||
self.options.getMatches(names, function(matches) {
|
||||
|
|
@ -1100,7 +1100,7 @@ Ox.ListMap = function(options, self) {
|
|||
|
||||
function updateList(key, value) {
|
||||
var query = {
|
||||
conditions: Ox.merge(
|
||||
conditions: [].concat(
|
||||
['all', 'name'].indexOf(key) > -1
|
||||
? [{key: 'name', value: value, operator: '='}] : [],
|
||||
['all', 'alternativeNames'].indexOf(key) > -1
|
||||
|
|
|
|||
|
|
@ -221,11 +221,11 @@ Ox.Map = function(options, self) {
|
|||
self.mapHeight = getMapHeight();
|
||||
self.metaKey = false;
|
||||
self.minZoom = getMinZoom();
|
||||
self.placeKeys = Ox.merge([
|
||||
self.placeKeys = [
|
||||
'id', 'name', 'alternativeNames', 'geoname', 'countryCode', 'type',
|
||||
'lat', 'lng', 'south', 'west', 'north', 'east', 'area',
|
||||
'editable'
|
||||
], self.options.keys);
|
||||
].concat(self.options.keys);
|
||||
self.resultPlace = null;
|
||||
self.scaleMeters = [
|
||||
50000000, 20000000, 10000000,
|
||||
|
|
@ -937,7 +937,7 @@ Ox.Map = function(options, self) {
|
|||
self.options.places({
|
||||
keys: self.placeKeys,
|
||||
query: {
|
||||
conditions: Ox.merge([
|
||||
conditions: [].concat([
|
||||
{key: 'lat', value: [south, north], operator: '='}
|
||||
], spansGlobe() ? [
|
||||
{key: 'lng', value: [-180, 180], operator: '='}
|
||||
|
|
|
|||
|
|
@ -30,16 +30,14 @@ Ox.MapMarkerImage = (function() {
|
|||
|
||||
if (!cache[index]) {
|
||||
var color = options.rectangle ? [0, 0, 0, 0]
|
||||
: Ox.merge(
|
||||
Ox.clone(options.color),
|
||||
: options.color.concat(
|
||||
[options.type == 'place' ? 0.75 : 0.25]
|
||||
),
|
||||
border = Ox.merge(
|
||||
options.mode == 'normal' ? [0, 0, 0]
|
||||
: options.mode == 'selected' ? [255, 255, 255]
|
||||
: [128, 128, 255],
|
||||
[options.type == 'result' ? 0.5 : 1]
|
||||
),
|
||||
border = (
|
||||
options.mode == 'normal' ? [0, 0, 0]
|
||||
: options.mode == 'selected' ? [255, 255, 255]
|
||||
: [128, 128, 255]
|
||||
).concat([options.type == 'result' ? 0.5 : 1]),
|
||||
c = Ox.canvas(options.size, options.size),
|
||||
image,
|
||||
r = options.size / 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue