Commit bac91ac8 authored by zhangbobell's avatar zhangbobell

feat(release): fix resource color splash and hasOwnProperty bug

parent a20e2a16
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "kityminder-core", "name": "kityminder-core",
"title": "Kity Minder Core", "title": "Kity Minder Core",
"description": "Powerful online mind graphic visualization and editor (command based)", "description": "Powerful online mind graphic visualization and editor (command based)",
"version": "1.4.36", "version": "1.4.37",
"main": [ "main": [
"dist/kityminder.core.min.js", "dist/kityminder.core.min.js",
"dist/kityminder.core.css" "dist/kityminder.core.css"
......
/*! /*!
* ==================================================== * ====================================================
* kityminder - v1.4.36 - 2017-03-10 * kityminder - v1.4.37 - 2017-03-23
* https://github.com/fex-team/kityminder-core * https://github.com/fex-team/kityminder-core
* GitHub: https://github.com/fex-team/kityminder-core.git * GitHub: https://github.com/fex-team/kityminder-core.git
* Copyright (c) 2017 Baidu FEX; Licensed MIT * Copyright (c) 2017 Baidu FEX; Licensed MIT
...@@ -1969,7 +1969,7 @@ _p[19] = { ...@@ -1969,7 +1969,7 @@ _p[19] = {
this.fire("finishInitHook"); this.fire("finishInitHook");
} }
}); });
Minder.version = "1.4.36"; Minder.version = "1.4.37";
Minder.registerInitHook = function(hook) { Minder.registerInitHook = function(hook) {
_initHooks.push(hook); _initHooks.push(hook);
}; };
...@@ -6660,7 +6660,7 @@ _p[57] = { ...@@ -6660,7 +6660,7 @@ _p[57] = {
getResourceColor: function(resource) { getResourceColor: function(resource) {
var colorMapping = this._getResourceColorIndexMapping(); var colorMapping = this._getResourceColorIndexMapping();
var nextIndex; var nextIndex;
if (!colorMapping.__proto__.hasOwnProperty(resource)) { if (!Object.prototype.hasOwnProperty.call(colorMapping, resource)) {
// 找不到找下个可用索引 // 找不到找下个可用索引
nextIndex = this._getNextResourceColorIndex(); nextIndex = this._getNextResourceColorIndex();
colorMapping[resource] = nextIndex; colorMapping[resource] = nextIndex;
...@@ -6677,7 +6677,7 @@ _p[57] = { ...@@ -6677,7 +6677,7 @@ _p[57] = {
var mapping = this._getResourceColorIndexMapping(); var mapping = this._getResourceColorIndexMapping();
var used = [], resource; var used = [], resource;
for (resource in mapping) { for (resource in mapping) {
if (mapping.hasOwnProperty(resource)) { if (Object.prototype.hasOwnProperty.call(mapping, resource)) {
used.push(resource); used.push(resource);
} }
} }
...@@ -6696,7 +6696,7 @@ _p[57] = { ...@@ -6696,7 +6696,7 @@ _p[57] = {
used = []; used = [];
// 抽取已经使用的值到 used 数组 // 抽取已经使用的值到 used 数组
for (resource in colorMapping) { for (resource in colorMapping) {
if (colorMapping.hasOwnProperty(resource)) { if (Object.prototype.hasOwnProperty.call(colorMapping, resource)) {
used.push(colorMapping[resource]); used.push(colorMapping[resource]);
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "kityminder", "name": "kityminder",
"title": "kityminder", "title": "kityminder",
"description": "KityMinder Core Implement", "description": "KityMinder Core Implement",
"version": "1.4.36", "version": "1.4.37",
"homepage": "https://github.com/fex-team/kityminder-core", "homepage": "https://github.com/fex-team/kityminder-core",
"author": { "author": {
"name": "Baidu FEX", "name": "Baidu FEX",
......
...@@ -30,7 +30,7 @@ define(function(require, exports, module) { ...@@ -30,7 +30,7 @@ define(function(require, exports, module) {
} }
}); });
Minder.version = '1.4.36'; Minder.version = '1.4.37';
Minder.registerInitHook = function(hook) { Minder.registerInitHook = function(hook) {
_initHooks.push(hook); _initHooks.push(hook);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment