mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-25 20:31:58 +00:00
Compare commits
No commits in common. "73004faf9bf85a770b2410a245a2890fd8181d72" and "0d4d766de9cb29ef1c973e58273fcc600c71a1d5" have entirely different histories.
73004faf9b
...
0d4d766de9
@ -156,17 +156,13 @@
|
|||||||
height: calc(2 * var(--item-padding) + 1em);
|
height: calc(2 * var(--item-padding) + 1em);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
resize: none;
|
resize: none;
|
||||||
opacity: 0;
|
|
||||||
|
|
||||||
/* show/hide node's view/code... */
|
/* show/hide node's view/code... */
|
||||||
&:focus {
|
/*&:focus+.view,*/
|
||||||
position: relative;
|
&:not(:focus) {
|
||||||
opacity: 1;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
/* hide .view content but show before/after -- keep bulets and touch zones... */
|
/* hide .view content but show before/after -- keep bulets and touch zones... */
|
||||||
&:focus+.view {
|
&:focus+.view {
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
|
||||||
&:before,
|
&:before,
|
||||||
@ -179,7 +175,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* click through the .view text to the .code */
|
/* click through the .view text to the .code */
|
||||||
/* NOTE: .view visibility is handled in .code above... */
|
|
||||||
&>.view {
|
&>.view {
|
||||||
position: relative;
|
position: relative;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
@ -283,16 +278,14 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
|
}
|
||||||
.text {
|
&:not([cropped])>.text {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
&,
|
&,
|
||||||
&[cropped] {
|
&[cropped] {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
/* XXX nesting this in &[cropped] for some reaon breaks things... */
|
|
||||||
&[cropped] .text {
|
&[cropped] .text {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,22 @@
|
|||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// Helpers...
|
// Helpers...
|
||||||
|
|
||||||
|
// XXX do a caret api...
|
||||||
|
|
||||||
|
// XXX only for text areas...
|
||||||
|
var atLine = function(elem, index){
|
||||||
|
// XXX add support for range...
|
||||||
|
var text = elem.value
|
||||||
|
var lines = text.split(/\n/g).length
|
||||||
|
var line = elem.caretLine
|
||||||
|
|
||||||
|
// XXX STUB index handling...
|
||||||
|
if((index == -1 && line == lines)
|
||||||
|
|| (index == 0 && line == 1)){
|
||||||
|
return true }
|
||||||
|
return false }
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
function clickPoint(x,y){
|
function clickPoint(x,y){
|
||||||
document
|
document
|
||||||
@ -1255,7 +1271,7 @@ var Outline = {
|
|||||||
+ this.path(...arguments, 'text')
|
+ this.path(...arguments, 'text')
|
||||||
.slice(0, -1)
|
.slice(0, -1)
|
||||||
.map(function(s, i, {length}){
|
.map(function(s, i, {length}){
|
||||||
return `<span class="path-item" uncrop="${ length-i }">${
|
return `<span class="path-item" onclick="editor.uncrop(${ length-i })">${
|
||||||
plugin.encode(s)
|
plugin.encode(s)
|
||||||
}</span> ` })
|
}</span> ` })
|
||||||
.join(' / ')
|
.join(' / ')
|
||||||
@ -2177,14 +2193,6 @@ var Outline = {
|
|||||||
function(evt){
|
function(evt){
|
||||||
that.__change__() })
|
that.__change__() })
|
||||||
|
|
||||||
// header...
|
|
||||||
var header = this.header
|
|
||||||
header.addEventListener('click',
|
|
||||||
function(evt){
|
|
||||||
var elem = evt.target
|
|
||||||
if(elem.classList.contains('path-item')){
|
|
||||||
that.uncrop(elem.getAttribute('uncrop') ?? 'all') } })
|
|
||||||
|
|
||||||
// toolbar...
|
// toolbar...
|
||||||
var toolbar = this.toolbar
|
var toolbar = this.toolbar
|
||||||
if(toolbar){
|
if(toolbar){
|
||||||
|
|||||||
@ -48,6 +48,8 @@ var setup = function(){
|
|||||||
-
|
-
|
||||||
- ## Bugs:
|
- ## Bugs:
|
||||||
focused:: true
|
focused:: true
|
||||||
|
- BUG: if changing style expands the block vertically it will not update size...
|
||||||
|
- # when edited, the text here will get re-wrapped but will not get resized
|
||||||
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
|
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
|
||||||
- FF:
|
- FF:
|
||||||
- zooming on edited field
|
- zooming on edited field
|
||||||
@ -57,7 +59,6 @@ var setup = function(){
|
|||||||
-
|
-
|
||||||
- ## ToDo:
|
- ## ToDo:
|
||||||
- custom element / web component
|
- custom element / web component
|
||||||
- BUG: selecting by _click-n-drag_ or _double/triple click_ for some reason does not work...
|
|
||||||
- BUG/race: the non-value versions of custom elem seem to sometimes get loaded as empty...
|
- BUG/race: the non-value versions of custom elem seem to sometimes get loaded as empty...
|
||||||
- Q: can we get rid of the editor block??:
|
- Q: can we get rid of the editor block??:
|
||||||
- CSS breaks if we do...
|
- CSS breaks if we do...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user