Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
a20e2a16
Commit
a20e2a16
authored
Mar 23, 2017
by
zhangbobell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(resource): continue to solve resouce hasOwnProperty problem to avoid color splash
parent
0a438efe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
resource.js
src/module/resource.js
+3
-3
No files found.
src/module/resource.js
View file @
a20e2a16
...
...
@@ -56,7 +56,7 @@ define(function(require, exports, module) {
var
colorMapping
=
this
.
_getResourceColorIndexMapping
();
var
nextIndex
;
if
(
!
colorMapping
.
__proto__
.
hasOwnProperty
(
resource
))
{
if
(
!
Object
.
prototype
.
hasOwnProperty
.
call
(
colorMapping
,
resource
))
{
// 找不到找下个可用索引
nextIndex
=
this
.
_getNextResourceColorIndex
();
colorMapping
[
resource
]
=
nextIndex
;
...
...
@@ -77,7 +77,7 @@ define(function(require, exports, module) {
resource
;
for
(
resource
in
mapping
)
{
if
(
mapping
.
hasOwnProperty
(
resource
))
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
mapping
,
resource
))
{
used
.
push
(
resource
);
}
}
...
...
@@ -101,7 +101,7 @@ define(function(require, exports, module) {
// 抽取已经使用的值到 used 数组
for
(
resource
in
colorMapping
)
{
if
(
colorMapping
.
hasOwnProperty
(
resource
))
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
colorMapping
,
resource
))
{
used
.
push
(
colorMapping
[
resource
]);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment