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
bd296802
Commit
bd296802
authored
Feb 14, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev
parent
677aeef7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
3 deletions
+56
-3
adapter.js
src/adapter/adapter.js
+2
-2
minder.data.js
src/core/minder.data.js
+1
-1
background.js
src/module/background.js
+53
-0
No files found.
src/adapter/adapter.js
View file @
bd296802
...
...
@@ -55,7 +55,7 @@ utils.extend( KityMinder, function () {
this
.
_createToolbar
(
containers
.
$toolbar
,
km
);
this
.
_createStatusbar
(
containers
.
$statusbar
,
km
);
km
.
$container
=
containers
.
$container
;
return
km
;
return
km
.
fire
(
'interactchange'
)
;
},
registerWidget
:
function
(
name
,
pro
,
cb
)
{
_widgetData
[
name
]
=
$
.
extend2
(
pro
,
{
...
...
@@ -116,4 +116,4 @@ utils.extend( KityMinder, function () {
_activeWidget
=
$widget
;
}
}
}()
);
}()
);
\ No newline at end of file
src/core/minder.data.js
View file @
bd296802
...
...
@@ -10,7 +10,7 @@ Utils.extend( KityMinder, {
return
Utils
.
keys
(
KityMinder
.
_protocals
);
},
getAllRegisteredProtocals
:
function
()
{
return
KityMinder
.
_protocals
return
KityMinder
.
_protocals
;
}
}
);
...
...
src/module/background.js
0 → 100644
View file @
bd296802
var
Grid
=
kity
.
createClass
(
'Grid'
,
{
base
:
kity
.
Rect
,
constructor
:
function
(
x
,
y
,
width
,
height
,
gridSize
,
color1
,
color2
)
{
this
.
color1
=
color1
||
'white'
;
this
.
color2
=
color2
||
'lightgray'
;
this
.
gridSize
=
gridSize
;
this
.
callBase
(
width
,
height
,
x
,
y
);
this
.
draw
();
},
draw
:
function
()
{
var
me
=
this
;
function
lazyDraw
()
{
var
paper
=
me
.
getPaper
();
if
(
!
paper
)
{
return
setTimeout
(
lazyDraw
,
100
);
}
var
size
=
me
.
gridSize
;
me
.
fill
(
new
kity
.
PatternBrush
().
pipe
(
function
()
{
this
.
setX
(
0
).
setY
(
0
);
this
.
setWidth
(
size
*
2
).
setHeight
(
size
*
2
);
this
.
addShape
(
new
kity
.
Rect
(
size
,
size
).
fill
(
me
.
color1
)
);
this
.
addShape
(
new
kity
.
Rect
(
size
,
size
,
size
,
size
).
fill
(
me
.
color1
)
);
paper
.
addResource
(
this
);
}
)
).
setOpacity
(
0
).
fadeIn
(
500
,
'ease'
);
}
lazyDraw
();
}
}
);
KityMinder
.
registerModule
(
'Background'
,
function
()
{
function
initBackground
()
{
var
start
=
kity
.
Color
.
createHSL
(
200
,
8
,
30
);
var
end
=
start
.
dec
(
'l'
,
5
);
var
paper
=
this
.
getPaper
();
var
grid
=
new
Grid
(
-
50000
,
-
50000
,
100000
,
100000
,
2
,
start
,
end
);
paper
.
addShape
(
grid
);
grid
.
bringBack
();
paper
.
setStyle
(
'background'
,
end
.
toString
()
);
}
function
resetBackground
()
{
}
return
{
events
:
{
'ready'
:
initBackground
,
'resize'
:
resetBackground
}
};
}
);
\ No newline at end of file
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