add point mode
This commit is contained in:
parent
7e7d72cf84
commit
c488459822
20
css/common/bootstrap.less
vendored
20
css/common/bootstrap.less
vendored
@ -196,28 +196,10 @@ hr {
|
||||
}
|
||||
|
||||
>[data-split] {
|
||||
padding: 0;
|
||||
padding: 0!important;
|
||||
width: 1px;
|
||||
height: 40px;
|
||||
background: lighten(#707781, 15%);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width:1200px) and (max-width:1400px){
|
||||
.command-groups {
|
||||
>li,
|
||||
>li[data-theme="ico"] {
|
||||
padding: 0 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width:1200px){
|
||||
.command-groups {
|
||||
>li,
|
||||
>li[data-theme="ico"] {
|
||||
padding: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
@ -159,8 +159,27 @@ body, html {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width:1300px) and (max-width:1600px){
|
||||
.command-groups {
|
||||
>li,
|
||||
>li[data-theme="ico"] {
|
||||
padding: 0 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width:1300px){
|
||||
.command-groups {
|
||||
>li,
|
||||
>li[data-theme="ico"] {
|
||||
padding: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.editor.editing {
|
||||
display: block;
|
||||
}
|
||||
|
@ -100,6 +100,38 @@
|
||||
}
|
||||
}
|
||||
|
||||
.glyf-list {
|
||||
|
||||
&.xlarge {
|
||||
>.glyf-item {
|
||||
width: 160px;
|
||||
.glyf {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.large {
|
||||
>.glyf-item {
|
||||
width: 120px;
|
||||
.glyf {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.small {
|
||||
>.glyf-item {
|
||||
width: 60px;
|
||||
.glyf {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.glyf-list.no-hover {
|
||||
.glyf-item {
|
||||
|
@ -178,4 +178,12 @@
|
||||
|
||||
.i-tangencyshapes {
|
||||
.i-ico('\e027');
|
||||
}
|
||||
|
||||
.i-rangemode {
|
||||
.i-ico('\e029');
|
||||
}
|
||||
|
||||
.i-pointmode {
|
||||
.i-ico('\e028');
|
||||
}
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 24 KiB |
Binary file not shown.
Binary file not shown.
@ -29,7 +29,7 @@ define(
|
||||
'joinshapes', 'intersectshapes', 'tangencyshapes'
|
||||
],
|
||||
// 单个形状
|
||||
shape: ['upshape', 'downshape', 'reversepoints']
|
||||
shape: ['pointmode', 'upshape', 'downshape', 'reversepoints']
|
||||
};
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ define(
|
||||
});
|
||||
});
|
||||
|
||||
var commandMenu = this.options.commandMenu;
|
||||
var commandMenu = this.commandMenu;
|
||||
if (commandMenu) {
|
||||
|
||||
editor.on('selection:change', lang.debounce(function(e) {
|
||||
@ -110,6 +110,9 @@ define(
|
||||
|
||||
if (shapes && shapes.length) {
|
||||
switch (command) {
|
||||
case 'pointmode':
|
||||
editor.setMode('point', shapes[0]);
|
||||
break;
|
||||
case 'topshape':
|
||||
case 'bottomshape':
|
||||
case 'upshape':
|
||||
@ -144,7 +147,10 @@ define(
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (command === 'rangemode') {
|
||||
editor.setMode('bound');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -169,8 +175,14 @@ define(
|
||||
* @param {Object} options 参数
|
||||
*/
|
||||
function GLYFEditor(main, options) {
|
||||
|
||||
this.main = $(main);
|
||||
this.options = options || {};
|
||||
this.options = lang.extend({}, options);
|
||||
|
||||
if (this.options.commandMenu) {
|
||||
this.commandMenu = this.options.commandMenu;
|
||||
delete this.options.commandMenu;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -255,7 +267,7 @@ define(
|
||||
this.editor.setOptions(options);
|
||||
}
|
||||
else {
|
||||
editorOptions.editor = options;
|
||||
lang.overwrite(editorOptions.editor, options);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -30,6 +30,19 @@ define(
|
||||
{
|
||||
type: 'split'
|
||||
},
|
||||
{
|
||||
name: 'rangemode',
|
||||
title: '轮廓模式',
|
||||
ico: 'rangemode'
|
||||
},
|
||||
{
|
||||
name: 'pointmode',
|
||||
title: '点模式',
|
||||
ico: 'pointmode'
|
||||
},
|
||||
{
|
||||
type: 'split'
|
||||
},
|
||||
{
|
||||
name: 'upshape',
|
||||
title: '上移一层',
|
||||
|
Loading…
x
Reference in New Issue
Block a user