Browse Source

KERNEL-13158: context跳过popup

es6
guy 2 years ago
parent
commit
4c54640fee
  1. 8
      examples/useContext.html

8
examples/useContext.html

@ -22,7 +22,7 @@
state: function () { state: function () {
return { return {
expand: false, expand: false,
cssScale: 2.0 cssScale: true
}; };
}, },
childContext: ["text", "cssScale"], childContext: ["text", "cssScale"],
@ -44,7 +44,7 @@
var TempModel = BI.inherit(BI.Model, { var TempModel = BI.inherit(BI.Model, {
state: function () { state: function () {
return { return {
cssScale: 1.0 cssScale: false
}; };
}, },
childContext: ["cssScale"], childContext: ["cssScale"],
@ -54,7 +54,7 @@
var oldFormat = BI.pixFormat; var oldFormat = BI.pixFormat;
BI.pixFormat = function (pix, border) { BI.pixFormat = function (pix, border) {
var context = BI.useContext("cssScale"); var context = BI.useContext("cssScale");
if (!context || context.model.cssScale <=1) { if (!context || context.model.cssScale === false) {
return oldFormat.apply(this, arguments); return oldFormat.apply(this, arguments);
} }
if (!BI.isNumber(pix)) { if (!BI.isNumber(pix)) {
@ -69,7 +69,7 @@
var oldPix = BI.toPix; var oldPix = BI.toPix;
BI.toPix = function (pix, border) { BI.toPix = function (pix, border) {
var context = BI.useContext("cssScale"); var context = BI.useContext("cssScale");
if (!context || context.model.cssScale <=1) { if (!context || context.model.cssScale === false) {
return oldFormat.apply(this, arguments); return oldFormat.apply(this, arguments);
} }
if (!BI.isNumber(pix)) { if (!BI.isNumber(pix)) {

Loading…
Cancel
Save